Detectron.pytorch icon indicating copy to clipboard operation
Detectron.pytorch copied to clipboard

Compile error: 'cuda.h'

Open Yuliang-Zou opened this issue 6 years ago • 6 comments

Not really an issue, just want to share my experience.

If you are using the code in some clusters, cuda might not be installed under /usr/local/cuda/. In this case, in addition to modifying CUDA_PATH in make.sh. You might also need to specify CPATH=/path/to/your/cuda/include.

For example CPATH=/path/to/your/cuda/include ./make.sh

Yuliang-Zou avatar Apr 21 '18 02:04 Yuliang-Zou

Does anyone know if CUDA installed by conda works with PyTorch? I installed it and torch seem to find devices correctly but haven't had the time to check training/inference yet.

Rizhiy avatar May 07 '18 12:05 Rizhiy

To my knowledge, pytorch use the CUDA and CUDNN installed by conda.

roytseng-tw avatar May 07 '18 15:05 roytseng-tw

Then perhaps it would be better to also use CUDA and CUDNN installed by conda.

Rizhiy avatar May 08 '18 20:05 Rizhiy

@Rizhiy I install the pytorch with pip install pytorch, but when I run cd lib and sh make.sh, I got some errors, like x86_64-linux-gnu-gcc: error: /home/yuyongbo/object_detection/Detectron.pytorch-master/lib/model/nms/src/nms_cuda_kernel.cu.o: No such file or directory

Ai-is-light avatar Jun 05 '18 02:06 Ai-is-light

@Yuliang-Zou Thanks for your hint! You've saved my day!

@Ai-is-light This is perhaps because the cuda code cannot be compiled successfully. In my case, I found error like nvcc: command not found and the path to nvcc did not set properly on my machine. After fixing this, I can build libs without errors. Hope this will help. :)

stoneyang avatar Jul 29 '18 02:07 stoneyang

@Rizhiy我用pip install pytorch安装了pytorch,但是当我运行cd lib和sh make.sh时,我遇到了一些错误,比如 x86_64-linux-gnu-gcc:error:/home/yuyongbo/object_detection/Detectron.pytorch- master / lib / model / nms / src / nms_cuda_kernel.cu.o:没有这样的文件或目录

你好,我也遇到同样的问题了,请问你解决了没有呀,谢谢

fc695355831 avatar Jan 23 '19 01:01 fc695355831