Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions src/plugins/intel_npu/tests/unit/npu/offline_compilation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,32 @@ class OfflineCompilationUnitTests : public ::testing::Test {
};

TEST_F(OfflineCompilationUnitTests, CompileWithCiPWhenDriverNotInstalledSetProperty) {
ov::AnyMap config;
const std::vector<std::string_view> platforms = {ov::intel_npu::Platform::NPU5010,
ov::intel_npu::Platform::NPU5020};

config[ov::intel_npu::compiler_type.name()] = ov::intel_npu::CompilerType::PLUGIN;
config[ov::intel_npu::platform.name()] = ov::intel_npu::Platform::NPU5010;
core.set_property(DEVICE_NPU, config);
for (const auto& platform : platforms) {
ov::AnyMap config;
config[ov::intel_npu::compiler_type.name()] = ov::intel_npu::CompilerType::PLUGIN;
config[ov::intel_npu::platform.name()] = platform;
core.set_property(DEVICE_NPU, config);

std::shared_ptr<ov::Model> model = ov::test::utils::make_multi_single_conv();
OV_ASSERT_NO_THROW(core.compile_model(model, DEVICE_NPU));
std::shared_ptr<ov::Model> model = ov::test::utils::make_multi_single_conv();
OV_ASSERT_NO_THROW(core.compile_model(model, DEVICE_NPU));
Comment on lines +34 to +41
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] The loop now tests multiple platforms inside a single gtest case, but if a failure occurs it won’t be obvious which platform triggered it. Consider adding a SCOPED_TRACE (or converting these to a parameterized test) so CI logs include the platform value that failed.

Copilot uses AI. Check for mistakes.
}
}

TEST_F(OfflineCompilationUnitTests, CompileWithCiPWhenDriverNotInstalled) {
ov::AnyMap config;
const std::vector<std::string_view> platforms = {ov::intel_npu::Platform::NPU5010,
ov::intel_npu::Platform::NPU5020};

config[ov::intel_npu::compiler_type.name()] = ov::intel_npu::CompilerType::PLUGIN;
config[ov::intel_npu::platform.name()] = ov::intel_npu::Platform::NPU5010;
for (const auto& platform : platforms) {
ov::AnyMap config;
config[ov::intel_npu::compiler_type.name()] = ov::intel_npu::CompilerType::PLUGIN;
config[ov::intel_npu::platform.name()] = platform;

std::shared_ptr<ov::Model> model = ov::test::utils::make_multi_single_conv();
OV_ASSERT_NO_THROW(core.compile_model(model, DEVICE_NPU, config));
std::shared_ptr<ov::Model> model = ov::test::utils::make_multi_single_conv();
OV_ASSERT_NO_THROW(core.compile_model(model, DEVICE_NPU, config));
}
}

using UnavailableDeviceTests = ::testing::Test;
Expand Down
Loading