Skip to content

Commit 3cfb3a7

Browse files
razvanapetroaienikita-kud
authored andcommittedNov 6, 2024
Forcing the CiP path even if the compiler type was set to "DRIVER"
1 parent 3138590 commit 3cfb3a7

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed
 

‎src/plugins/intel_npu/src/plugin/src/plugin.cpp

+1-12
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,7 @@ std::unique_ptr<ICompilerAdapter> Plugin::getCompiler(const Config& config) cons
920920
_logger.debug("performing createCompiler");
921921

922922
switch (compilerType) {
923+
case ov::intel_npu::CompilerType::DRIVER:
923924
case ov::intel_npu::CompilerType::MLIR: {
924925
if (_backends->getBackendName() != "LEVEL0") {
925926
return std::make_unique<PluginCompilerAdapter>(nullptr);
@@ -932,18 +933,6 @@ std::unique_ptr<ICompilerAdapter> Plugin::getCompiler(const Config& config) cons
932933

933934
return std::make_unique<PluginCompilerAdapter>(zeroBackend->getInitStruct());
934935
}
935-
case ov::intel_npu::CompilerType::DRIVER: {
936-
if (_backends->getBackendName() != "LEVEL0") {
937-
OPENVINO_THROW("NPU Compiler Adapter must be used with LEVEL0 backend");
938-
}
939-
940-
auto zeroBackend = std::dynamic_pointer_cast<ZeroEngineBackend>(_backends->getIEngineBackend()._ptr);
941-
if (!zeroBackend) {
942-
OPENVINO_THROW("Failed to cast zeroBackend, zeroBackend is a nullptr");
943-
}
944-
945-
return std::make_unique<DriverCompilerAdapter>(zeroBackend->getInitStruct());
946-
}
947936
default:
948937
OPENVINO_THROW("Invalid NPU_COMPILER_TYPE");
949938
}

0 commit comments

Comments
 (0)