I installed cuda using sudo apt install nvidia-cuda-toolkit
(not using the instructions on the Nvidia site). This is known to not install the samples, so I went on github to download them, as explained in another question.
I cd'ed into Samples/deviceQuery and tried make
, but it complained that nvcc was not found, so I looked at the Makefile and changed the command to CUDA_PATH=/usr make
and it worked. This works because the Makefile has the definition CUDA_PATH ?= /usr/local/cuda
, while apt install nvidia-cuda-toolkit
actually puts nvcc at /usr/bin/nvcc
.
Then I tried doing the same thing in Samples/matrixMulDrv, but it gave me a different error:
>>> WARNING - libcuda.so not found, CUDA Driver is not installed. Please re-install the driver. <<<
Doing locate libcuda.so
says I do have it, and it's at /usr/lib/x86_64-linux-gnu
.
How can I make matrixMulDrv?
Мне удалось успешно скомпилировать его с помощью следующей команды:
CUDA_PATH=/usr CUDA_SEARCH_PATH=/usr/lib/x86_64-linux-gnu make