Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const std::vector<ov::AnyMap> emptyConfig = {{}};
const std::vector<ov::AnyMap> cipConfig = {
{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::PLUGIN),
ov::intel_npu::platform(ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU))}};
const std::vector<ov::AnyMap> bothConfig = {
{},
{ov::intel_npu::compiler_type(ov::intel_npu::CompilerType::PLUGIN),
ov::intel_npu::platform(ov::test::utils::getTestsPlatformFromEnvironmentOr(ov::test::utils::DEVICE_NPU))}};

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
WeightsSeparationTests,
Expand All @@ -22,3 +26,9 @@ INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(cipConfig)),
WeightsSeparationOneShotTests::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTest,
WeightsSeparationIterativeTests,
::testing::Combine(::testing::Values(ov::test::utils::DEVICE_NPU),
::testing::ValuesIn(bothConfig)),
WeightsSeparationIterativeTests::getTestCaseName);
Original file line number Diff line number Diff line change
Expand Up @@ -172,21 +172,6 @@ TEST_P(WeightsSeparationTests, CheckForFailureNoWeightlessCacheAttribute) {
OV_EXPECT_THROW(compiled_model = core->compile_model(model, target_device, configuration), ov::Exception, _);
}

/**
* @brief Compiles a basic model and checks if it produces correct results.
*/
TEST_P(WeightsSeparationTests, CorrectInferenceResultNoImportIterative) {
model = createTestModel();
configuration.insert(ov::intel_npu::weightless_blob(true));
configuration.insert(ov::intel_npu::separate_weights_version(ov::intel_npu::WSVersion::ITERATIVE));

OV_ASSERT_NO_THROW(compiled_model = core->compile_model(model, target_device, configuration));
ASSERT_TRUE(compiled_model);
EXPECT_FALSE(compiled_model.get_property(ov::loaded_from_cache));

create_infer_request_and_check_result();
}

/**
* @brief compile -> import using OV caching -> create inference request -> run one inference and check the result
*/
Expand Down Expand Up @@ -474,6 +459,23 @@ TEST_P(WeightsSeparationOneShotTests, CorrectInferenceResultNoImportOneShot) {
create_infer_request_and_check_result();
}

using WeightsSeparationIterativeTests = WeightsSeparationTests;

/**
* @brief Compiles a basic model and checks if it produces correct results.
*/
TEST_P(WeightsSeparationIterativeTests, CorrectInferenceResultNoImportIterative) {
model = createTestModel();
configuration.insert(ov::intel_npu::weightless_blob(true));
configuration.insert(ov::intel_npu::separate_weights_version(ov::intel_npu::WSVersion::ITERATIVE));

OV_ASSERT_NO_THROW(compiled_model = core->compile_model(model, target_device, configuration));
ASSERT_TRUE(compiled_model);
EXPECT_FALSE(compiled_model.get_property(ov::loaded_from_cache));

create_infer_request_and_check_result();
}

} // namespace behavior
} // namespace test
} // namespace ov
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ Example:
<message>Only "developer built" compilers support weights separation</message>
<filters>
<filter>.*WeightsSeparationTests.*</filter>
<filter>.*WeightsSeparationNotSupportedTests.*</filter>
<filter>.*WeightsSeparationIterativeTests.*</filter>
</filters>
</skip_config>

Expand Down
Loading