@@ -753,7 +753,6 @@ TEST_P(RemoteRunTests, checkResultsAfterChangingStateTensorsWithRemoteTensors) {
753
753
auto model = createModelWithStates (element::f32, original_shape);
754
754
755
755
auto context = core->get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
756
- ;
757
756
758
757
compiled_model = core->compile_model (model, target_device, configuration);
759
758
ov::InferRequest inference_request;
@@ -851,7 +850,6 @@ TEST_P(RemoteRunTests, checkResultsAfterChangingStateDataWithRemoteAndRandomTens
851
850
auto model = createModelWithStates (element::f32, original_shape);
852
851
853
852
auto context = core->get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
854
- ;
855
853
856
854
compiled_model = core->compile_model (model, target_device, configuration);
857
855
ov::InferRequest inference_request;
@@ -940,7 +938,6 @@ TEST_P(RemoteRunTests, checkResultsAfterChangingStateDataWithRemoteAndRandomTens
940
938
auto model = createModelWithStates (element::f32, original_shape);
941
939
942
940
auto context = core->get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
943
- ;
944
941
945
942
compiled_model = core->compile_model (model, target_device, configuration);
946
943
ov::InferRequest inference_request;
@@ -1018,6 +1015,42 @@ TEST_P(RemoteRunTests, checkResultsAfterChangingStateDataWithRemoteAndRandomTens
1018
1015
}
1019
1016
}
1020
1017
1018
+ TEST_P (RemoteRunTests, CheckContextFromDifferentOvCores) {
1019
+ // Skip test according to plugin specific disabledTestPatterns() (if any)
1020
+ SKIP_IF_CURRENT_TEST_IS_DISABLED ()
1021
+ ov::Core core0;
1022
+ ov::Core core1;
1023
+
1024
+ auto context0 = core->get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
1025
+ auto context1 = core0.get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
1026
+ auto context2 = core1.get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
1027
+
1028
+ EXPECT_EQ (context0.get (), context1.get ());
1029
+ EXPECT_EQ (context1.get (), context2.get ());
1030
+ }
1031
+
1032
+ TEST_P (RemoteRunTests, CheckContextFromDifferentDestroyedOvCores) {
1033
+ // Skip test according to plugin specific disabledTestPatterns() (if any)
1034
+ SKIP_IF_CURRENT_TEST_IS_DISABLED ()
1035
+
1036
+ ov::RemoteContext context1, context2;
1037
+ auto context0 = core->get_default_context (target_device).as <ov::intel_npu::level_zero::ZeroContext>();
1038
+
1039
+ {
1040
+ ov::Core internal_core;
1041
+ context1 = internal_core.get_default_context (target_device);
1042
+ }
1043
+
1044
+ {
1045
+ ov::Core internal_core;
1046
+ context2 = internal_core.get_default_context (target_device);
1047
+ }
1048
+
1049
+ EXPECT_EQ (context0.get (), context1.get_params ().at (ov::intel_npu::l0_context.name ()).as <void *>());
1050
+ EXPECT_EQ (context1.get_params ().at (ov::intel_npu::l0_context.name ()).as <void *>(),
1051
+ context2.get_params ().at (ov::intel_npu::l0_context.name ()).as <void *>());
1052
+ }
1053
+
1021
1054
} // namespace behavior
1022
1055
} // namespace test
1023
1056
} // namespace ov
0 commit comments