Skip to content

Commit

Permalink
[intel-npu] Quickfix for core.get_available_devices exception on host…
Browse files Browse the repository at this point in the history
…s with no NPU compiler (#28484)

### Details:
- Quickfix for core.get_available_devices exception on hosts with no NPU
compiler
- get_available_devices calls get_property(supported_properties), which
throws exception if there is no compiler. catching that exception.

### Tickets:
 - [*CVS-160690*](https://jira.devtools.intel.com/browse/CVS-160690)
  • Loading branch information
csoka authored Jan 16, 2025
1 parent c849f72 commit 061119a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/plugins/intel_npu/src/plugin/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,10 +585,17 @@ void Plugin::reset_supported_properties() const {
}

void Plugin::reset_compiler_dependent_properties() const {
uint32_t active_compiler_version = 0;
// get active compiler version
CompilerAdapterFactory compilerAdapterFactory;
auto dummyCompiler = compilerAdapterFactory.getCompiler(_backends->getIEngineBackend(), _globalConfig);
uint32_t active_compiler_version = dummyCompiler->get_version();
try {
CompilerAdapterFactory compilerAdapterFactory;
auto dummyCompiler = compilerAdapterFactory.getCompiler(_backends->getIEngineBackend(), _globalConfig);
active_compiler_version = dummyCompiler->get_version();
} catch (...) {
_logger.warning(
"No available compiler. Can not determine version > compiler dependent properties remain hidden");
return;
}

// NPU_COMPILER_DYNAMIC_QUANTIZATION
// unpublish if compiler version requirement is not met
Expand Down

0 comments on commit 061119a

Please sign in to comment.