Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[NPU] Use small value as illegal tilecount for VCL before 7.6 (#34104)

Xin Wang4e1879ab258d
diff --git a/src/plugins/intel_npu/src/compiler_adapter/src/compiler_impl.cpp b/src/plugins/intel_npu/src/compiler_adapter/src/compiler_impl.cpp
index 2d7c114b31e..12e237eab69 100644
--- a/src/plugins/intel_npu/src/compiler_adapter/src/compiler_impl.cpp
+++ b/src/plugins/intel_npu/src/compiler_adapter/src/compiler_impl.cpp
@@ -4,6 +4,7 @@
#include "compiler_impl.hpp"
+#include <limits>
#include <mutex>
#include "intel_npu/config/options.hpp"
@@ -338,10 +339,15 @@ VCLCompilerImpl::VCLCompilerImpl() : _logHandle(nullptr), _logger("VCLCompilerIm
// This information cannot be determined during the initialization phase; set device desc default value, the related
// info will be processed in compile phase if passed by user.
_logger.info("Device description is not provided, using default values");
+ uint32_t defaultTileCount = std::numeric_limits<uint32_t>::max();
+ if (_vclVersion.major == 7 && _vclVersion.minor < 6) {
+ // For vcl <= 7.5, need to use smaller value to pass check
+ defaultTileCount = std::numeric_limits<uint16_t>::max();
+ }
vcl_device_desc_t device_desc = {sizeof(vcl_device_desc_t),
0x00,
- static_cast<uint16_t>(-1),
- static_cast<uint32_t>(-1)};
+ std::numeric_limits<uint16_t>::max(),
+ defaultTileCount};
THROW_ON_FAIL_FOR_VCL("vclCompilerCreate",
vclCompilerCreate(&compilerDesc, &device_desc, &_compilerHandle, &_logHandle),
nullptr);
diff --git a/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp
new file mode 100644
index 00000000000..43ba9f5ef2f
--- /dev/null
+++ b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.cpp
@@ -0,0 +1,23 @@
+// Copyright (C) 2018-2026 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+//
+
+#include "behavior/plugin_compiler_compile.hpp"
+
+#include "common/utils.hpp"
+#include "intel_npu/config/options.hpp"
+#include "intel_npu/npu_private_properties.hpp"
+
+namespace {
+
+const std::vector<ov::AnyMap> configs = {
+ {{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU4000"}, {"NPU_CREATE_EXECUTOR", "0"}},
+ {{"NPU_COMPILER_TYPE", "PLUGIN"}, {"NPU_PLATFORM", "NPU5010"}, {"NPU_CREATE_EXECUTOR", "0"}}};
+
+INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
+ TestPluginCompilerCompilationNPU,
+ ::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
+ ::testing::ValuesIn(configs)),
+ TestPluginCompilerCompilationNPU::getTestCaseName);
+
+} // namespace
diff --git a/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.hpp b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.hpp
new file mode 100644
index 00000000000..ebb767c2a62
--- /dev/null
+++ b/src/plugins/intel_npu/tests/functional/behavior/plugin_compiler_compile.hpp
@@ -0,0 +1,58 @@
+// Copyright (C) 2018-2026 Intel Corporation
+// SPDX-License-Identifier: Apache-2.0
+//
+
+#pragma once
+
+#include <cstring>
+#include <string>
+#include <vector>
+
+#include "common/functions.hpp"
+#include "common/npu_test_env_cfg.hpp"
+#include "shared_test_classes/base/ov_behavior_test_utils.hpp"
+
+namespace {
+
+class TestPluginCompilerCompilationNPU : public ov::test::behavior::OVPluginTestBase,
+ public testing::WithParamInterface<std::tuple<std::string, ov::AnyMap>> {
+public:
+ void SetUp() override {
+ std::tie(target_device, configuration) = GetParam();
+ OVPluginTestBase::SetUp();
+ }
+
+ static std::string getTestCaseName(const testing::TestParamInfo<std::tuple<std::string, ov::AnyMap>>& obj) {
+ std::string targetDevice;
+ ov::AnyMap configuration;
+ std::tie(targetDevice, configuration) = obj.param;
+ std::replace(targetDevice.begin(), targetDevice.end(), ':', '.');
+ std::ostringstream result;
+ result << "targetDevice=" << targetDevice << "_";
+ result << "targetPlatform=" << ov::test::utils::getTestsPlatformFromEnvironmentOr(targetDevice) << "_";
+ if (!configuration.empty()) {
+ using namespace ov::test::utils;
+ for (auto& configItem : configuration) {
+ result << "configItem=" << configItem.first << "_";
+ configItem.second.print(result);
+ }
+ }
+ return result.str();
+ }
+
+protected:
+ ov::AnyMap configuration;
+ std::shared_ptr<ov::Core> core = ov::test::utils::PluginCache::get().core();
+};
+
+TEST_P(TestPluginCompilerCompilationNPU, compileWithDefaultCompilerConfig) {
+ SKIP_IF_CURRENT_TEST_IS_DISABLED() {
+ const auto& model = buildSingleLayerSoftMaxNetwork();
+ ov::CompiledModel compiledModel;
+ OV_ASSERT_NO_THROW(compiledModel = core->compile_model(model, target_device, configuration));
+ std::stringstream modelStream;
+ OV_ASSERT_NO_THROW(compiledModel.export_model(modelStream));
+ }
+}
+
+} // namespace