@@ -137,6 +137,22 @@ TEST_F(OrtEpLibraryOv, MetaDevicesAvailable) {
137
137
}
138
138
}
139
139
140
+ TEST_F (OrtEpLibraryOv, RunSessionWithAllAUTODevices) {
141
+ auto ep_devices = ort_env->GetEpDevices ();
142
+ std::vector<Ort::ConstEpDevice> matching_devices;
143
+
144
+ for (const auto & device : ep_devices) {
145
+ std::string ep_name = device.EpName ();
146
+ if (ep_name.find (registration_name) != std::string::npos &&
147
+ (ep_name == registration_name + " .AUTO" )) {
148
+ matching_devices.push_back (device);
149
+ }
150
+ }
151
+ Ort::SessionOptions session_options;
152
+ session_options.AppendExecutionProvider_V2 (*ort_env, matching_devices, std::unordered_map<std::string, std::string>{});
153
+ Ort::Session session (*ort_env, ORT_TSTR (" testdata/mul_1.onnx" ), session_options);
154
+ }
155
+
140
156
TEST_F (OrtEpLibraryOv, PluginEp_AppendV2_MulInference) {
141
157
auto plugin_ep_device = GetOvCpuEpDevice ();
142
158
ASSERT_NE (plugin_ep_device, nullptr );
@@ -178,6 +194,31 @@ TEST_F(OrtEpLibraryOv, PluginEp_AppendV2_cpu_epctx_variants) {
178
194
}
179
195
}
180
196
197
+ TEST_F (OrtEpLibraryOv, PluginEp_CheckV2DisallowedProviderOptions) {
198
+ auto plugin_ep_device = GetOvCpuEpDevice ();
199
+ ASSERT_NE (plugin_ep_device, nullptr );
200
+ std::vector<std::unordered_map<std::string, std::string>> disallowed_provider_option_examples = {
201
+ {{" device_type" , " CPU" }},
202
+ {{" device_id" , " CPU" }},
203
+ {{" device_luid" , " 1234" }},
204
+ {{" cache_dir" , " cache" }},
205
+ {{" precision" , " F32" }},
206
+ {{" context" , " 4" }},
207
+ {{" num_of_threads" , " 1" }},
208
+ {{" model_priority" , " DEFAULT" }},
209
+ {{" num_streams" , " 1" }},
210
+ {{" enable_opencl_throttling" , " true" }},
211
+ {{" enable_qdq_optimizer" , " true" }},
212
+ {{" disable_dynamic_shapes" , " true" }},
213
+ };
214
+ for (auto & example : disallowed_provider_option_examples) {
215
+ EXPECT_THROW ({
216
+ Ort::SessionOptions session_options;
217
+ session_options.AppendExecutionProvider_V2 (*ort_env, std::vector<Ort::ConstEpDevice>{plugin_ep_device}, example);
218
+ Ort::Session session (*ort_env, ORT_TSTR (" testdata/mul_1.onnx" ), session_options); }, Ort::Exception);
219
+ }
220
+ }
221
+
181
222
TEST_F (OrtEpLibraryOv, GenerateEpContextEmbedded) {
182
223
GenerateEpContextOnPluginPath (ORT_TSTR (" mul_1_ctx_cpu_embed1.onnx" ), true );
183
224
}
0 commit comments