Skip to content
Snippets Groups Projects
Commit 1ea14c8d authored by psychocrypt's avatar psychocrypt
Browse files

fix output of gpu name

fix that the GPU name is printed before the name is querried from OpenCL
parent a8e83eec
No related branches found
No related tags found
No related merge requests found
...@@ -518,13 +518,13 @@ std::vector<GpuContext> getAMDDevices(int index) ...@@ -518,13 +518,13 @@ std::vector<GpuContext> getAMDDevices(int index)
printer::inst()->print_msg(L1,"WARNING: %s when calling clGetDeviceInfo to get CL_DEVICE_NAME for device %u.", err_to_str(clStatus), k); printer::inst()->print_msg(L1,"WARNING: %s when calling clGetDeviceInfo to get CL_DEVICE_NAME for device %u.", err_to_str(clStatus), k);
continue; continue;
} }
printer::inst()->print_msg(L0,"Found OpenCL GPU %s.",ctx.name.c_str());
// if environment variable GPU_SINGLE_ALLOC_PERCENT is not set we can not allocate the full memory // if environment variable GPU_SINGLE_ALLOC_PERCENT is not set we can not allocate the full memory
ctx.deviceIdx = k; ctx.deviceIdx = k;
ctx.freeMem = std::min(ctx.freeMem, maxMem); ctx.freeMem = std::min(ctx.freeMem, maxMem);
ctx.name = std::string(devNameVec.data()); ctx.name = std::string(devNameVec.data());
ctx.DeviceID = device_list[k]; ctx.DeviceID = device_list[k];
printer::inst()->print_msg(L0,"Found OpenCL GPU %s.",ctx.name.c_str());
ctxVec.push_back(ctx); ctxVec.push_back(ctx);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment