Auto batch fix default val +test (#10169)

* default config value for the AUTO_BATCH_TIMEOUT

* test for default config value for the AUTO_BATCH_TIMEOUT

* default val for timeout var
This commit is contained in:
Maxim Shevtsov authored and GitHub committed 2022-02-08 10:14:15 +03:00
1 parent 0a316216f3
commit 863c74471f
3 files changed
+17 -4

No files matched your search

+3 -2
View File
@@ -308,8 +308,8 @@ AutoBatchExecutableNetwork::AutoBatchExecutableNetwork(
// WA for gcc 4.8 ( fails compilation with member init-list)
_device = networkDevice;
auto time_out = config.find(CONFIG_KEY(AUTO_BATCH_TIMEOUT));
if (time_out != config.end())
_timeOut = ParseTimeoutValue(time_out->second.as<std::string>());
IE_ASSERT(time_out != config.end());
_timeOut = ParseTimeoutValue(time_out->second.as<std::string>());
}
AutoBatchExecutableNetwork::~AutoBatchExecutableNetwork() {
@@ -639,6 +639,7 @@ IE_DEFINE_PLUGIN_CREATE_FUNCTION(AutoBatchInferencePlugin, version)
AutoBatchInferencePlugin::AutoBatchInferencePlugin() {
_pluginName = "BATCH";
_config[CONFIG_KEY(AUTO_BATCH_TIMEOUT)] = "1000"; // default value, in ms
}
InferenceEngine::Parameter AutoBatchInferencePlugin::GetMetric(
+1 -1
View File
@@ -80,7 +80,7 @@ protected:
std::unordered_map<std::string, InferenceEngine::Parameter> _config;
bool _needPerfCounters = false;
std::atomic_size_t _numRequestsCreated = {0};
std::atomic_int _timeOut = {1000}; // in ms
std::atomic_int _timeOut = {0}; // in ms
};
class AutoBatchInferRequest : public InferenceEngine::IInferRequestInternal {