Skip to content

Commit dd2c8cb

Browse files
authored
[NPU] Skip core threading tests on PV driver (#34877)
### Details: - *Skip core threading tests on PV driver* ### Tickets: - *N/A* ### AI Assistance: - *AI assistance used: no / yes* - *If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).* Signed-off-by: Bogdan Pereanu <bogdan.pereanu@intel.com>
1 parent ea3e9fb commit dd2c8cb

File tree

2 files changed

+35
-24
lines changed

2 files changed

+35
-24
lines changed

src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
2121
::testing::ValuesIn(configs)),
2222
ov::test::utils::appendPlatformTypeTestName<OVCompileAndInferRequest>);
2323

24+
INSTANTIATE_TEST_SUITE_P(smoke_BehaviorTests,
25+
OVCompileAndInferRequestMultiThreading,
26+
::testing::Combine(::testing::Values(getConstantGraph(ov::element::f32)),
27+
::testing::Values(ov::test::utils::DEVICE_NPU),
28+
::testing::ValuesIn(configs)),
29+
ov::test::utils::appendPlatformTypeTestName<OVCompileAndInferRequestMultiThreading>);
30+
2431
INSTANTIATE_TEST_SUITE_P(compatibility_smoke_BehaviorTests,
2532
OVCompileAndInferRequestTurbo,
2633
::testing::Combine(::testing::Values(getConstantGraph(ov::element::f32)),

src/plugins/intel_npu/tests/functional/behavior/ov_infer_request/compile_and_infer.hpp

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,34 @@ TEST_P(OVCompileAndInferRequest, CompiledModelAndCreateMultipleInferRequestsWith
238238
OV_ASSERT_NO_THROW(req2.infer());
239239
}
240240

241-
TEST_P(OVCompileAndInferRequest, MultiThreadedCreateAndInferRequestsOnDifferentThreads) {
241+
TEST_P(OVCompileAndInferRequest, CompiledModelWorkloadTypeUpdateAfterCompilation) {
242+
if (!isCommandQueueExtSupported()) {
243+
GTEST_SKIP() << "Workload type update is not supported with current driver.\n";
244+
}
245+
246+
configuration[workload_type.name()] = WorkloadType::DEFAULT;
247+
OV_ASSERT_NO_THROW(execNet = core->compile_model(function, target_device, configuration));
248+
249+
ASSERT_EQ(execNet.get_property(workload_type.name()).as<WorkloadType>(), WorkloadType::DEFAULT);
250+
ov::AnyMap modelConfiguration;
251+
modelConfiguration[workload_type.name()] = WorkloadType::EFFICIENT;
252+
OV_ASSERT_NO_THROW(execNet.set_property(modelConfiguration));
253+
ASSERT_EQ(execNet.get_property(workload_type.name()).as<WorkloadType>(), WorkloadType::EFFICIENT);
254+
ov::InferRequest req;
255+
OV_ASSERT_NO_THROW(req = execNet.create_infer_request());
256+
bool is_called = false;
257+
OV_ASSERT_NO_THROW(req.set_callback([&](std::exception_ptr exception_ptr) {
258+
ASSERT_EQ(exception_ptr, nullptr);
259+
is_called = true;
260+
}));
261+
OV_ASSERT_NO_THROW(req.start_async());
262+
OV_ASSERT_NO_THROW(req.wait());
263+
ASSERT_TRUE(is_called);
264+
}
265+
266+
using OVCompileAndInferRequestMultiThreading = OVCompileAndInferRequest;
267+
268+
TEST_P(OVCompileAndInferRequestMultiThreading, CreateInferRequestsAndRunOnDifferentThreads) {
242269
configuration[intel_npu::defer_weights_load.name()] = true;
243270
OV_ASSERT_NO_THROW(execNet = core->compile_model(function, target_device, configuration));
244271

@@ -274,29 +301,6 @@ TEST_P(OVCompileAndInferRequest, MultiThreadedCreateAndInferRequestsOnDifferentT
274301
}
275302
}
276303

277-
TEST_P(OVCompileAndInferRequest, CompiledModelWorkloadTypeUpdateAfterCompilation) {
278-
if (isCommandQueueExtSupported()) {
279-
configuration[workload_type.name()] = WorkloadType::DEFAULT;
280-
OV_ASSERT_NO_THROW(execNet = core->compile_model(function, target_device, configuration));
281-
282-
ASSERT_EQ(execNet.get_property(workload_type.name()).as<WorkloadType>(), WorkloadType::DEFAULT);
283-
ov::AnyMap modelConfiguration;
284-
modelConfiguration[workload_type.name()] = WorkloadType::EFFICIENT;
285-
OV_ASSERT_NO_THROW(execNet.set_property(modelConfiguration));
286-
ASSERT_EQ(execNet.get_property(workload_type.name()).as<WorkloadType>(), WorkloadType::EFFICIENT);
287-
ov::InferRequest req;
288-
OV_ASSERT_NO_THROW(req = execNet.create_infer_request());
289-
bool is_called = false;
290-
OV_ASSERT_NO_THROW(req.set_callback([&](std::exception_ptr exception_ptr) {
291-
ASSERT_EQ(exception_ptr, nullptr);
292-
is_called = true;
293-
}));
294-
OV_ASSERT_NO_THROW(req.start_async());
295-
OV_ASSERT_NO_THROW(req.wait());
296-
ASSERT_TRUE(is_called);
297-
}
298-
}
299-
300304
using OVCompileAndInferRequestTurbo = OVCompileAndInferRequest;
301305

302306
TEST_P(OVCompileAndInferRequestTurbo, CompiledModelTurbo) {

0 commit comments

Comments
 (0)