Skip to content
Open
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
3 changes: 2 additions & 1 deletion src/plugins/intel_npu/src/plugin/include/properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Properties final {
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>> _properties;
std::vector<ov::PropertyName> _supportedProperties;

// internal registration functions basd on client object
// internal registration functions based on client object
void registerPluginProperties();
void registerCompiledModelProperties();

Expand All @@ -89,6 +89,7 @@ class Properties final {
ov::intel_npu::dynamic_shape_to_static.name(),
ov::intel_npu::enable_strides_for.name(),
ov::intel_npu::max_tiles.name(),
ov::intel_npu::stepping.name(),
ov::intel_npu::tiles.name(),
ov::intel_npu::turbo.name(),
ov::intel_npu::qdq_optimization.name(),
Expand Down
24 changes: 16 additions & 8 deletions src/plugins/intel_npu/src/plugin/src/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,19 +393,27 @@ void Properties::registerPluginProperties() {

TRY_REGISTER_CUSTOMFUNC_PROPERTY(ov::intel_npu::stepping, STEPPING, [&](const Config& config) {
if (!config.has<STEPPING>()) {
const auto specifiedDeviceName = get_specified_device_name(config);
return static_cast<int64_t>(_metrics->GetSteppingNumber(specifiedDeviceName));
} else {
return config.get<STEPPING>();
try {
const auto specifiedDeviceName = get_specified_device_name(config);
return static_cast<int64_t>(_metrics->GetSteppingNumber(specifiedDeviceName));
} catch (...) {
Logger("Properties", ov::log::Level::WARNING)
.warning("Metrics GetSteppingNumber failed to get value from device.");
}
}
return config.get<STEPPING>();
});
TRY_REGISTER_CUSTOMFUNC_PROPERTY(ov::intel_npu::max_tiles, MAX_TILES, [&](const Config& config) {
if (!config.has<MAX_TILES>()) {
const auto specifiedDeviceName = get_specified_device_name(config);
return static_cast<int64_t>(_metrics->GetMaxTiles(specifiedDeviceName));
} else {
return config.get<MAX_TILES>();
try {
const auto specifiedDeviceName = get_specified_device_name(config);
return static_cast<int64_t>(_metrics->GetMaxTiles(specifiedDeviceName));
} catch (...) {
Logger("Properties", ov::log::Level::WARNING)
.warning("Metrics GetMaxTiles failed to get value from device.");
}
}
return config.get<MAX_TILES>();
});

TRY_REGISTER_VARPUB_PROPERTY(ov::intel_npu::run_inferences_sequentially, RUN_INFERENCES_SEQUENTIALLY, [&] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ const std::vector<ov::AnyMap> cachingProperties = {
{ov::hint::execution_mode(ov::hint::ExecutionMode::PERFORMANCE)},
{ov::hint::inference_precision(ov::element::i8)},
{ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)},
{ov::intel_npu::batch_compiler_mode_settings("NPU_BATCH_SIZE=4")},
{ov::intel_npu::batch_compiler_mode_settings("batch-compile-method=unroll")},
{ov::intel_npu::batch_mode(ov::intel_npu::BatchMode::COMPILER)},
{ov::intel_npu::compilation_mode("ReferenceSW")},
{ov::intel_npu::compilation_mode_params("dummy-op-replacement=true")},
Expand All @@ -134,11 +134,11 @@ const std::vector<ov::AnyMap> cachingProperties = {
{ov::intel_npu::dma_engines(1)},
{ov::intel_npu::dynamic_shape_to_static("true")},
{ov::intel_npu::max_tiles(64)},
{ov::intel_npu::stepping(1)},
{ov::intel_npu::tiles(2)},
{ov::intel_npu::turbo(true)},
{ov::intel_npu::qdq_optimization(true)},
{ov::intel_npu::qdq_optimization_aggressive(true)}
};
{ov::intel_npu::qdq_optimization_aggressive(true)}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests_CachingSupportCase_NPU_Check_Config,
CompileModelLoadFromCacheTest,
Expand Down
Loading