fix gpu check bug (#3866)

* fix gpu check bug

Signed-off-by: godchen0212 <qingxiang.chen@zilliz.com>

* format code

Signed-off-by: godchen0212 <qingxiang.chen@zilliz.com>
Signed-off-by: shengjun.li <shengjun.li@zilliz.com>
pull/3916/head
chen qingxiang 2020-09-25 14:25:50 +08:00 committed by shengjun.li
parent 1784233528
commit b6134311e0
1 changed files with 1 additions and 5 deletions

View File

@ -188,11 +188,7 @@ GpuChecker::CheckGpuEnvironment() {
char device_name[NVML_DEVICE_NAME_BUFFER_SIZE];
int major, minor;
for (uint32_t i = 0; i < device_count; i++) {
if (gpu_sets.find(i) == gpu_sets.end()) {
continue;
}
for (uint32_t i = 0; i < gpu_sets.size(); i++) {
nvmlDevice_t device;
nvmlresult = nvmlDeviceGetHandleByIndex(i, &device);
fiu_do_on("GpuChecker.CheckGpuEnvironment.nvml_get_device_handle_fail", nvmlresult = NVML_ERROR_UNKNOWN);