[IE][VPU]: myriad_compile doesn't work without device - fix (#2054)

* Revert setting deprecated PLATFORM config option in compile tool
This commit is contained in:
Daria Mityagina 2020-09-08 11:21:18 +03:00 committed by GitHub
parent 6357ce83c5
commit ef3b9e1d1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -113,9 +113,6 @@ static bool parseCommandLine(int *argc, char ***argv, InferenceEngine::Core& ie)
if (std::string::npos != FLAGS_d.find("MYRIAD")) {
std::vector<std::string> myriadDeviceIds = ie.GetMetric("MYRIAD", METRIC_KEY(AVAILABLE_DEVICES));
if (myriadDeviceIds.empty()) {
throw std::runtime_error{"No available MYRIAD devices"};
}
}
if (1 < *argc) {
@ -151,6 +148,10 @@ static std::map<std::string, std::string> parseConfig(const std::string& configN
static std::map<std::string, std::string> configure(const std::string &configFile, const std::string &xmlFileName) {
auto config = parseConfig(configFile);
IE_SUPPRESS_DEPRECATED_START
config[VPU_MYRIAD_CONFIG_KEY(PLATFORM)] = "VPU_MYRIAD_2480";
IE_SUPPRESS_DEPRECATED_END
if (!FLAGS_VPU_NUMBER_OF_SHAVES.empty()) {
config[InferenceEngine::MYRIAD_NUMBER_OF_SHAVES] = FLAGS_VPU_NUMBER_OF_SHAVES;
}

View File

@ -105,6 +105,10 @@ static bool parseCommandLine(int *argc, char ***argv) {
static std::map<std::string, std::string> configure(const std::string &configFile, const std::string &xmlFileName) {
auto config = parseConfig(configFile);
IE_SUPPRESS_DEPRECATED_START
config[VPU_MYRIAD_CONFIG_KEY(PLATFORM)] = "VPU_MYRIAD_2480";
IE_SUPPRESS_DEPRECATED_END
if (!FLAGS_VPU_NUMBER_OF_SHAVES.empty()) {
config[InferenceEngine::MYRIAD_NUMBER_OF_SHAVES] = FLAGS_VPU_NUMBER_OF_SHAVES;
}