Skip to content

Commit

Permalink
Address comments and update options description
Browse files Browse the repository at this point in the history
  • Loading branch information
eshiryae committed Oct 17, 2024
1 parent 7ae7d1b commit 5fe82f9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 9 additions & 5 deletions src/plugins/intel_npu/src/al/include/npuw_private_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ static constexpr ov::Property<std::string> devices{"NPUW_DEVICES"};
* @brief
* Type: std::string.
* Force the specific subgraph to specific device. The device must be present in the NPUW_DEVICES list.
* Possible values: Comma-separated "Subgraph index:OpenVINO device name" pairs,
* e.g. "0:CPU,1:NPU".
* Possible values: Comma-separated "Subgraph index:OpenVINO device name" pairs, "last" keyword can be
* used for last subgraph, e.g. "0:CPU,1:NPU,last:CPU".
* Default value: empty.
*/
static constexpr ov::Property<std::string> submodel_device{"NPUW_SUBMODEL_DEVICE"};
Expand Down Expand Up @@ -307,7 +307,9 @@ static constexpr ov::Property<bool> full{"NPUW_DUMP_FULL"};
* Type: std::string.
* Dump the specified subgraph(s) in OpenVINO IR form in the current directory.
* Possible values: Comma-separated list of subgraph indices or "YES" for all
* subgraphs, "NO" or just empty value to turn option off. E.g. "0,1" or "YES".
* subgraphs, "NO" or just empty value to turn option off. Keyword "last" can
* be used for dumping last subgraph without specifying it by specific indice.
* E.g. "0,1" or "0,1,last" or "YES".
* Default value: empty.
*/
static constexpr ov::Property<std::string> subgraphs{"NPUW_DUMP_SUBS"};
Expand All @@ -317,7 +319,8 @@ static constexpr ov::Property<std::string> subgraphs{"NPUW_DUMP_SUBS"};
* Type: std::string.
* Dump subgraph on disk if a compilation failure happens.
* Possible values: Comma-separated list of subgraph indices or "YES" for all
* subgraphs, "NO" or just empty value to turn option off. E.g. "0,1" or "YES".
* subgraphs, "NO" or just empty value to turn option off. Keyword "last" can
* be used for dumping last subgraph. E.g. "0,1" or "0,1,last" or "YES".
* Default value: empty.
*/
static constexpr ov::Property<std::string> subgraphs_on_fail{"NPUW_DUMP_SUBS_ON_FAIL"};
Expand All @@ -327,7 +330,8 @@ static constexpr ov::Property<std::string> subgraphs_on_fail{"NPUW_DUMP_SUBS_ON_
* Type: std::string.
* Dump input & output tensors for subgraph(s).
* Possible values: Comma-separated list of subgraph indices or "YES" for all
* subgraphs, "NO" or just empty value to turn option off. E.g. "0,1" or "YES".
* subgraphs, "NO" or just empty value to turn option off. Keyword "last" can
* be used for last subgraph. E.g. "0,1" or "0,1,last" or "YES".
* Default value: empty.
*/
static constexpr ov::Property<std::string> inputs_outputs{"NPUW_DUMP_IO"};
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/intel_npu/src/plugin/npuw/compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@ ov::npuw::CompiledModel::CompiledModel(const std::shared_ptr<ov::Model>& model,
std::map<std::size_t, std::string> forced_sub_devices{};
std::string fsd_opt = m_cfg.get<::intel_npu::NPUW_SUBMODEL_DEVICE>();
// Change "last" keyword to tail subgraph number
uint32_t last_sub_id = static_cast<uint32_t>(m_compiled_submodels.size() - 1);
std::size_t last_pos = fsd_opt.find("last");
if (last_pos != std::string::npos) {
fsd_opt.erase(last_pos, 4);
fsd_opt.insert(last_pos, std::to_string(last_sub_id));
fsd_opt.insert(last_pos, std::to_string(last_sub_idx));
}

forced_sub_devices = ::intel_npu ::OptionParser<std::map<std::size_t, std::string>>::parse(fsd_opt);
Expand Down

0 comments on commit 5fe82f9

Please sign in to comment.