Fix that brings back the MULTI's ability to add/remove devices (to the priorities...
authorMaxim Shevtsov <maxim.y.shevtsov@intel.com>
Tue, 14 Jul 2020 16:15:52 +0000 (19:15 +0300)
committerGitHub <noreply@github.com>
Tue, 14 Jul 2020 16:15:52 +0000 (19:15 +0300)
the point is that we should check the ORIGINALLY (largest) list of the devices (actually ExecutableNetworks for them) to see if the device is just added back

inference-engine/src/multi_device/multi_device.cpp

index 3639384..d12e69f 100644 (file)
@@ -268,9 +268,9 @@ void MultiDeviceExecutableNetwork::SetConfig(const std::map<std::string, Inferen
         {
             std::lock_guard<std::mutex> lock{_mutex};
             for (auto && device : metaDevices) {
-                if (_devicePriorities.find(device.first) == _devicePriorities.end()) {
+                if (_networksPerDevice.find(device.first) == _networksPerDevice.end()) {
                     THROW_IE_EXCEPTION << NOT_FOUND_str << "You can only change device priorities but not add new devices with"
-                        << " the Network's SetConfig(MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES." << device.first <<
+                        << " the Network's SetConfig(MultiDeviceConfigParams::KEY_MULTI_DEVICE_PRIORITIES. " << device.first <<
                             " device was not in the original device list!";
                 }
             }