[AUTOPLUGIN] don't check dynamic shape when there is only one device (#10868)

* don't check dynamic shape when there is only one device

Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>

* remove redundant if

Signed-off-by: Hu, Yuan2 <yuan2.hu@intel.com>
This commit is contained in:
Yuan Hu 2022-03-16 09:56:23 +08:00 committed by GitHub
parent 8c9c592fcf
commit 50adb2240c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -719,6 +719,12 @@ std::vector<DeviceInformation> MultiDeviceInferencePlugin::FilterDevice(const st
} }
std::vector<DeviceInformation> MultiDeviceInferencePlugin::FilterDeviceByNetwork(const std::vector<DeviceInformation>& metaDevices, std::vector<DeviceInformation> MultiDeviceInferencePlugin::FilterDeviceByNetwork(const std::vector<DeviceInformation>& metaDevices,
InferenceEngine::CNNNetwork network) { InferenceEngine::CNNNetwork network) {
if (metaDevices.empty()) {
IE_THROW(NotFound) << "No available device to filter " << GetName() << " plugin";
} else if (metaDevices.size() == 1) {
return metaDevices;
}
std::vector<DeviceInformation> filterDevice; std::vector<DeviceInformation> filterDevice;
auto model = network.getFunction(); auto model = network.getFunction();
if (model->is_dynamic()) { if (model->is_dynamic()) {