fix multi cuda environment bug (#31694)

test_benchmark_ci
Zhou Wei 4 years ago committed by GitHub
parent 09482ddec4
commit d4282ea97e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -442,7 +442,8 @@ def find_cuda_home():
[which_cmd, 'nvcc'], stderr=devnull)
if six.PY3:
nvcc_path = nvcc_path.decode()
nvcc_path = nvcc_path.rstrip('\r\n')
# Multi CUDA, select the first
nvcc_path = nvcc_path.split('\r\n')[0]
# for example: /usr/local/cuda/bin/nvcc
cuda_home = os.path.dirname(os.path.dirname(nvcc_path))

Loading…
Cancel
Save