Skip to content

Commit 1dc6d37

Browse files
adding an WS iterative + compilerType::PLUGIN test as well
1 parent 5046eff commit 1dc6d37

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

src/plugins/intel_npu/tests/functional/behavior/weights_separation.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ const std::vector<ov::AnyMap> emptyConfig = {{}};
1010
const std::vector<ov::AnyMap> cipConfig = {
1111
{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::PLUGIN),
1212
ov::intel_npu::platform(ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU))}};
13+
const std::vector<ov::AnyMap> bothConfig = {
14+
{},
15+
{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::PLUGIN),
16+
ov::intel_npu::platform(ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU))}};
1317

1418
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
1519
WeightsSeparationTests,
@@ -22,3 +26,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
2226
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
2327
::testing::ValuesIn(cipConfig)),
2428
WeightsSeparationOneShotTests::getTestCaseName);
29+
30+
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
31+
WeightsSeparationIterativeTests,
32+
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
33+
::testing::ValuesIn(bothConfig)),
34+
WeightsSeparationIterativeTests::getTestCaseName);

src/plugins/intel_npu/tests/functional/behavior/weights_separation.hpp

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -172,21 +172,6 @@ TEST_P(WeightsSeparationTests, CheckForFailureNoWeightlessCacheAttribute) {
172172
OV_EXPECT_THROW(compiled_model = core->compile_model(model, target_device, configuration), ov::Exception, _);
173173
}
174174

175-
/**
176-
* @brief Compiles a basic model and checks if it produces correct results.
177-
*/
178-
TEST_P(WeightsSeparationTests, CorrectInferenceResultNoImportIterative) {
179-
model = createTestModel();
180-
configuration.insert(ov::intel_npu::weightless_blob(true));
181-
configuration.insert(ov::intel_npu::separate_weights_version(ov::intel_npu::WSVersion::ITERATIVE));
182-
183-
OV_ASSERT_NO_THROW(compiled_model = core->compile_model(model, target_device, configuration));
184-
ASSERT_TRUE(compiled_model);
185-
EXPECT_FALSE(compiled_model.get_property(ov::loaded_from_cache));
186-
187-
create_infer_request_and_check_result();
188-
}
189-
190175
/**
191176
* @brief compile -> import using OV caching -> create inference request -> run one inference and check the result
192177
*/
@@ -474,6 +459,23 @@ TEST_P(WeightsSeparationOneShotTests, CorrectInferenceResultNoImportOneShot) {
474459
create_infer_request_and_check_result();
475460
}
476461

462+
using WeightsSeparationIterativeTests = WeightsSeparationTests;
463+
464+
/**
465+
* @brief Compiles a basic model and checks if it produces correct results.
466+
*/
467+
TEST_P(WeightsSeparationIterativeTests, CorrectInferenceResultNoImportIterative) {
468+
model = createTestModel();
469+
configuration.insert(ov::intel_npu::weightless_blob(true));
470+
configuration.insert(ov::intel_npu::separate_weights_version(ov::intel_npu::WSVersion::ITERATIVE));
471+
472+
OV_ASSERT_NO_THROW(compiled_model = core->compile_model(model, target_device, configuration));
473+
ASSERT_TRUE(compiled_model);
474+
EXPECT_FALSE(compiled_model.get_property(ov::loaded_from_cache));
475+
476+
create_infer_request_and_check_result();
477+
}
478+
477479
} // namespace behavior
478480
} // namespace test
479481
} // namespace ov

0 commit comments

Comments
 (0)