Skip to content

Commit ba237c4

Browse files
committed
Fix DISABLE_VERSION_CHECK condition not taking into account globalConfig (set_property and env vars)
1 parent 969e4a5 commit ba237c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -801,8 +801,9 @@ std::shared_ptr<ov::ICompiledModel> Plugin::import_model(std::istream& stream, c
801801

802802
try {
803803
const bool skipCompatibility =
804-
npu_plugin_properties.find(DISABLE_VERSION_CHECK::key().data()) != npu_plugin_properties.end() &&
805-
npu_plugin_properties[DISABLE_VERSION_CHECK::key().data()].as<bool>() == true;
804+
(npu_plugin_properties.find(DISABLE_VERSION_CHECK::key().data()) != npu_plugin_properties.end())
805+
? npu_plugin_properties[DISABLE_VERSION_CHECK::key().data()].as<bool>()
806+
: _globalConfig.get<DISABLE_VERSION_CHECK>();
806807
std::unique_ptr<MetadataBase> metadata = nullptr;
807808
size_t blobSize = MetadataBase::getFileSize(stream);
808809
if (!skipCompatibility) {
@@ -856,8 +857,9 @@ std::shared_ptr<ov::ICompiledModel> Plugin::import_model(const ov::Tensor& compi
856857

857858
try {
858859
const bool skipCompatibility =
859-
npu_plugin_properties.find(DISABLE_VERSION_CHECK::key().data()) != npu_plugin_properties.end() &&
860-
npu_plugin_properties[DISABLE_VERSION_CHECK::key().data()].as<bool>() == true;
860+
(npu_plugin_properties.find(DISABLE_VERSION_CHECK::key().data()) != npu_plugin_properties.end())
861+
? npu_plugin_properties[DISABLE_VERSION_CHECK::key().data()].as<bool>()
862+
: _globalConfig.get<DISABLE_VERSION_CHECK>();
861863
std::unique_ptr<MetadataBase> metadata = nullptr;
862864
size_t blobSize = compiled_blob.get_byte_size();
863865
if (!skipCompatibility) {

0 commit comments

Comments
 (0)