vinx13 commented on PR #16903: URL: https://github.com/apache/tvm/pull/16903#issuecomment-2064534127
I found the issue is not about `cudaGetDeviceCount`, `cudaGetDeviceCount` doesn't return error, however, the issue is it doesn't check `CUDA_VISIBLE_DEVICES` setting but like other APIs do. When you set `CUDA_VISIBLE_DEVICES` to empty, checking `kExist` will return true, and other attrs will checked and cause no device error. I think we should recover the original check before #16377 that uses `cudaDeviceGetAttribute` and clear the error code if not exists -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org