File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
src/plugins/intel_npu/src/compiler_adapter Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ class VCLApi {
5454
5555private:
5656 std::shared_ptr<void > lib;
57+ Logger _logger;
5758};
5859
5960#define vcl_symbol_statement (vcl_symbol ) \
Original file line number Diff line number Diff line change 1111#include " openvino/util/shared_object.hpp"
1212
1313namespace intel_npu {
14- VCLApi::VCLApi () {
14+ VCLApi::VCLApi () : _logger( " VCLApi " , ov::log::Level::DEBUG) {
1515 const std::string baseName = " npu_driver_compiler" ;
1616 try {
1717 auto libpath = ov::util::make_plugin_library_name ({}, baseName);
18+ _logger.debug (" Try to load npu_driver_compiler" );
1819
1920#if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
2021 this ->lib = ov::util::load_shared_object (ov::util::string_to_wstring (libpath).c_str ());
2122#else
2223 this ->lib = ov::util::load_shared_object (libpath.c_str ());
2324#endif
2425 } catch (const std::runtime_error& error) {
25- OPENVINO_THROW (error.what ());
26+ // OPENVINO_THROW(error.what());
27+ try {
28+ _logger.error (" Failed to load npu_driver_compiler: %s" , error.what ());
29+ _logger.debug (" Try to load npu_mlir_compiler with VCL interface" );
30+ const std::string rollBackName = " npu_mlir_compiler" ;
31+ auto libpath = ov::util::make_plugin_library_name ({}, rollBackName);
32+
33+ #if defined(OPENVINO_ENABLE_UNICODE_PATH_SUPPORT) && defined(_WIN32)
34+ this ->lib = ov::util::load_shared_object (ov::util::string_to_wstring (libpath).c_str ());
35+ #else
36+ this ->lib = ov::util::load_shared_object (libpath.c_str ());
37+ #endif
38+ } catch (const std::runtime_error& error) {
39+ OPENVINO_THROW (" Failed to load npu_mlir_compiler with VCL interface: " , error.what ());
40+ }
2641 }
2742
2843 try {
You can’t perform that action at this time.
0 commit comments