Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STORE_LOGGER_LOG #27627

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,24 @@ struct BATCH_MODE final : OptionBase<BATCH_MODE, ov::intel_npu::BatchMode> {
static std::string toString(const ov::intel_npu::BatchMode& val);
};

//
// STORE_LOGGER_LOG
//

struct STORE_LOGGER_LOG final : OptionBase<STORE_LOGGER_LOG, bool> {
static std::string_view key() {
return ov::intel_npu::store_logger_log.name();
}

static std::string_view envVar() {
return "OV_NPU_STORE_LOGGER_LOG";
}

static bool defaultValue() {
return false;
}
};

} // namespace intel_npu

namespace ov {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,5 +373,12 @@ static constexpr ov::Property<std::string, ov::PropertyMutability::RO> backend_n
*/
static constexpr ov::Property<std::string> backend_compilation_params{"NPU_BACKEND_COMPILATION_PARAMS"};

/**
* @brief [Only for NPU compiler]
* Type: boolean, default is false.
* This option allows to store the log during compilation
*/
static constexpr ov::Property<bool> store_logger_log{"NPU_STORE_LOGGER_LOG"};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we actually need a new property for that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nor sure if we need to have a switch to turn off this feature on plugin side, if we always keep the feature on, i think can remove the option


} // namespace intel_npu
} // namespace ov
1 change: 1 addition & 0 deletions src/plugins/intel_npu/src/al/src/config/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ void intel_npu::registerRunTimeOptions(OptionsDesc& desc) {
desc.add<WORKLOAD_TYPE>();
desc.add<TURBO>();
desc.add<BYPASS_UMD_CACHING>();
desc.add<STORE_LOGGER_LOG>();
}

// Heuristically obtained number. Varies depending on the values of PLATFORM and PERFORMANCE_HINT
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/intel_npu/src/plugin/src/compiled_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ void CompiledModel::initialize_properties() {
[](const Config& config) {
return config.get<DEFER_WEIGHTS_LOAD>();
}}},
{ov::intel_npu::store_logger_log.name(),
{false,
ov::PropertyMutability::RO,
[](const Config& config) {
return config.get<STORE_LOGGER_LOG>();
}}},
{ov::intel_npu::batch_mode.name(),
{false,
ov::PropertyMutability::RO,
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/intel_npu/src/plugin/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,12 @@ Plugin::Plugin()
[](const Config& config) {
return config.getString<BACKEND_COMPILATION_PARAMS>();
}}},
{ov::intel_npu::store_logger_log.name(),
{false,
ov::PropertyMutability::RW,
[](const Config& config) {
return config.getString<STORE_LOGGER_LOG>();
}}},
{ov::intel_npu::batch_mode.name(), {false, ov::PropertyMutability::RW, [](const Config& config) {
return config.getString<BATCH_MODE>();
}}}};
Expand Down
Loading