lilanxiao / Rotated_IoU

Differentiable IoU of rotated bounding boxes using Pytorch
MIT License
415 stars 64 forks source link

Please Help #44

Closed Deerzh closed 2 years ago

Deerzh commented 2 years ago

请问一下大佬为啥执行完 python setup.py install后,会报错呢 Traceback (most recent call last): File "setup.py", line 9, in 'sort_vert_kernel.cu', File "/home/zhang/anaconda3/envs/RI/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 705, in CUDAExtension library_dirs += library_paths(cuda=True) File "/home/zhang/anaconda3/envs/RI/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 795, in library_paths if (not os.path.exists(_join_cuda_home(lib_dir)) and File "/home/zhang/anaconda3/envs/RI/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1652, in _join_cuda_home raise EnvironmentError('CUDA_HOME environment variable is not set. ' OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.

lilanxiao commented 2 years ago

你好,你应该没有安装CUDA toolkit。根据你PyTorch的版本去安装一个就行了。我自己是在10.2和11.1版本的CUDA上做的测试,后来的版本我感觉都问题不大。

另外,在debug branch上有一个不需要自定义CUDA算子的版本,不需要自己编译任何东西。你也可以试试。