@@ -224,6 +224,15 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
224
224
}
225
225
}
226
226
}
227
+ auto find_device_type_mode = [&](const std::string& device_type) -> std::string {
228
+ std::string device_mode=" " ;
229
+ auto delimiter_pos = device_type.find (' :' );
230
+ if (delimiter_pos != std::string::npos) {
231
+ std::stringstream str_stream (device_type.substr (0 , delimiter_pos));
232
+ std::getline (str_stream, device_mode, ' ,' );
233
+ }
234
+ return device_mode;
235
+ };
227
236
228
237
// Parse device types like "AUTO:CPU,GPU" and extract individual devices
229
238
auto parse_individual_devices = [&](const std::string& device_type) -> std::vector<std::string> {
@@ -272,8 +281,12 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
272
281
if (session_context_.device_type .find (" AUTO" ) == 0 ||
273
282
session_context_.device_type .find (" HETERO" ) == 0 ||
274
283
session_context_.device_type .find (" MULTI" ) == 0 ) {
284
+ // // Parse to get the device mode (e.g., "AUTO:CPU,GPU" -> "AUTO")
285
+ auto device_mode = find_device_type_mode (session_context_.device_type );
275
286
// Parse individual devices (e.g., "AUTO:CPU,GPU" -> ["CPU", "GPU"])
276
287
auto individual_devices = parse_individual_devices (session_context_.device_type );
288
+ if (!device_mode.empty ()) individual_devices.emplace_back (device_mode);
289
+
277
290
// Set properties only for individual devices (e.g., "CPU", "GPU")
278
291
for (const std::string& device : individual_devices) {
279
292
if (target_config.count (device)) {
@@ -284,6 +297,8 @@ void BasicBackend::PopulateConfigValue(ov::AnyMap& device_config) {
284
297
}
285
298
}
286
299
} else {
300
+ std::unordered_set<std::string> valid_ov_devices = {" CPU" , " GPU" , " NPU" , " AUTO" , " HETERO" , " MULTI" };
301
+
287
302
if (target_config.count (session_context_.device_type )) {
288
303
auto supported_properties = OVCore::Get ()->core .get_property (session_context_.device_type ,
289
304
ov::supported_properties);
0 commit comments