switched to pure config, also improved ALLOW_AUTO_BATCHING config key handling logic
This commit is contained in:
parent
127719086d
commit
94afc33f5a
@ -526,11 +526,14 @@ public:
|
||||
}
|
||||
|
||||
const auto& batch_mode = config_with_batch.find(CONFIG_KEY(ALLOW_AUTO_BATCHING));
|
||||
if (batch_mode == config_with_batch.end() || batch_mode->second != CONFIG_VALUE(YES))
|
||||
if (batch_mode == config_with_batch.end())
|
||||
return;
|
||||
const auto enabled = batch_mode->second == CONFIG_VALUE(YES);
|
||||
// no need for this config key in the rest of loading
|
||||
config_with_batch.erase(batch_mode);
|
||||
if (!enabled)
|
||||
return;
|
||||
try {
|
||||
// no need for this config key in the rest of loading
|
||||
config_with_batch.erase(batch_mode);
|
||||
// do not reshape/re-batch originally batched networks!
|
||||
const InputsDataMap inputInfo = network.getInputsInfo();
|
||||
ICNNNetwork::InputShapes shapes = network.getInputShapes();
|
||||
@ -595,8 +598,7 @@ public:
|
||||
if (bDetectionOutput) {
|
||||
deviceName = "HETERO:BATCH," + deviceNameWithoutBatch;
|
||||
std::cout << "HETERO code path!!!!" << std::endl;
|
||||
// config_with_batch[CONFIG_KEY(AUTO_BATCH)] = batchConfig;
|
||||
SetConfigForPlugins({{CONFIG_KEY(AUTO_BATCH), batchConfig}}, "BATCH");
|
||||
config_with_batch[CONFIG_KEY(AUTO_BATCH)] = batchConfig;
|
||||
} else {
|
||||
deviceName = "BATCH:" + batchConfig;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user