Merged
fix(inplace_apply_ftrl): default GEIR examples to device 0 #14365
陈展熹Add on 9 days ago
fix(inplace_apply_ftrl): default GEIR examples to device 0 #14365
Merged
Total: 2 files changed+2-2
| @@ -335,7 +335,7 @@ int main(int argc, char* argv[]) | |||
| 335 | printf("InplaceApplyFtrl GE IR Static Shape Example\n"); | 335 | printf("InplaceApplyFtrl GE IR Static Shape Example\n"); |
| 336 | printf("Start to initialize ge\n"); | 336 | printf("Start to initialize ge\n"); |
| 337 | const char* envDev = std::getenv("GE_DEVICE_ID"); | 337 | const char* envDev = std::getenv("GE_DEVICE_ID"); |
| 338 | - std::string devId = (envDev && *envDev) ? std::string(envDev) : std::string("7"); | 338 | + std::string devId = (envDev && *envDev) ? std::string(envDev) : std::string("0"); |
| 339 | std::map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", devId.c_str()}, | 339 | std::map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", devId.c_str()}, |
| 340 | {"ge.graphRunMode", "1"}}; | 340 | {"ge.graphRunMode", "1"}}; |
| 341 | Status ret = ge::GEInitialize(global_options); | 341 | Status ret = ge::GEInitialize(global_options); |
| @@ -325,7 +325,7 @@ int main(int argc, char* argv[]) | |||
| 325 | printf("InplaceApplyFtrl GE IR Dynamic Shape Example\n"); | 325 | printf("InplaceApplyFtrl GE IR Dynamic Shape Example\n"); |
| 326 | printf("Start to initialize ge\n"); | 326 | printf("Start to initialize ge\n"); |
| 327 | const char* envDev = std::getenv("GE_DEVICE_ID"); | 327 | const char* envDev = std::getenv("GE_DEVICE_ID"); |
| 328 | - std::string devId = (envDev && *envDev) ? std::string(envDev) : std::string("7"); | 328 | + std::string devId = (envDev && *envDev) ? std::string(envDev) : std::string("0"); |
| 329 | std::map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", devId.c_str()}, | 329 | std::map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", devId.c_str()}, |
| 330 | {"ge.graphRunMode", "1"}}; | 330 | {"ge.graphRunMode", "1"}}; |
| 331 | Status ret = ge::GEInitialize(global_options); | 331 | Status ret = ge::GEInitialize(global_options); |