File tree 1 file changed +12
-1
lines changed
src/plugins/intel_npu/src/plugin/src
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -969,7 +969,6 @@ std::unique_ptr<ICompilerAdapter> Plugin::getCompiler(const Config& config) cons
969
969
_logger.debug (" performing createCompiler" );
970
970
971
971
switch (compilerType) {
972
- case ov::intel_npu::CompilerType::DRIVER:
973
972
case ov::intel_npu::CompilerType::MLIR: {
974
973
if (_backends->getBackendName () != " LEVEL0" ) {
975
974
return std::make_unique<PluginCompilerAdapter>(nullptr );
@@ -982,6 +981,18 @@ std::unique_ptr<ICompilerAdapter> Plugin::getCompiler(const Config& config) cons
982
981
983
982
return std::make_unique<PluginCompilerAdapter>(zeroBackend->getInitStruct ());
984
983
}
984
+ case ov::intel_npu::CompilerType::DRIVER: {
985
+ if (_backends->getBackendName () != " LEVEL0" ) {
986
+ OPENVINO_THROW (" NPU Compiler Adapter must be used with LEVEL0 backend" );
987
+ }
988
+
989
+ auto zeroBackend = std::dynamic_pointer_cast<ZeroEngineBackend>(_backends->getIEngineBackend ()._ptr );
990
+ if (!zeroBackend) {
991
+ OPENVINO_THROW (" Failed to cast zeroBackend, zeroBackend is a nullptr" );
992
+ }
993
+
994
+ return std::make_unique<DriverCompilerAdapter>(zeroBackend->getInitStruct ());
995
+ }
985
996
default :
986
997
OPENVINO_THROW (" Invalid NPU_COMPILER_TYPE" );
987
998
}
You can’t perform that action at this time.
0 commit comments