Description
I am trying to build tensorrt, but it is looking for a version of Cuda that is not on my machine:
~/TensorRT/build$ make
[ 2%] Built target third_party.protobuf
[ 26%] Built target nvinfer_plugin_static
[ 51%] Built target nvinfer_plugin
[ 51%] Built target caffe_proto
[ 57%] Built target nvcaffeparser_static
[ 63%] Built target nvcaffeparser
[ 64%] Built target gen_onnx_proto
[ 65%] Built target onnx_proto
[ 67%] Built target nvonnxparser_static
[ 67%] Linking CXX executable getSupportedAPITest
/usr/bin/ld: warning: libcublas.so.10, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcudart.so.10.2, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvrtc.so.10.2, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to cudaGetDevice' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaDeviceSynchronize’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to cudaPeekAtLastError' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcCreateProgram@libnvrtc.so.10.2’
etc…
looking at /usr/local, we see that 10.2 is not there:
~/TensorRT/build$ ls /usr/local
bin cuda cuda-10.0 cuda-11.2 doc etc games include lib man sbin share src
Environment
TensorRT Version: 8
GPU Type: titan rtx
Nvidia Driver Version:
CUDA Version: 11.2
CUDNN Version:
Operating System + Version: ubuntu 20.04
Python Version (if applicable):
TensorFlow Version (if applicable):
PyTorch Version (if applicable):
Baremetal or Container (if container which image + tag):
Steps To Reproduce
mkdir build
cd build
cmake …
make
- Full traceback of errors encountered
~/TensorRT/build$ make
[ 2%] Built target third_party.protobuf
[ 26%] Built target nvinfer_plugin_static
[ 51%] Built target nvinfer_plugin
[ 51%] Built target caffe_proto
[ 57%] Built target nvcaffeparser_static
[ 63%] Built target nvcaffeparser
[ 64%] Built target gen_onnx_proto
[ 65%] Built target onnx_proto
[ 67%] Built target nvonnxparser_static
[ 67%] Linking CXX executable getSupportedAPITest
/usr/bin/ld: warning: libcublas.so.10, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libcudart.so.10.2, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvrtc.so.10.2, needed by /usr/lib/libnvinfer.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaGetDevice' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaDeviceSynchronize’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaPeekAtLastError' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcCreateProgram@libnvrtc.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasGetMathMode@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
__cudaRegisterFunction@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to__cudaUnregisterFatBinary@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaFreeHost’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaMemcpy2DAsync@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cublasSetMathMode’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocublasSetStream_v2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcAddNameExpression@libnvrtc.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to__cudaPushCallConfiguration' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasGetVersion_v2@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaGetErrorName' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaEventDestroy’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaCreateTextureObject@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaDeviceGetAttribute’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaDestroyTextureObject@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaHostAlloc’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaEventCreateWithFlags@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaUnregisterFatBinary’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaFuncGetAttributes' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaPeekAtLastError@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaEventCreateWithFlags' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaRegisterFatBinary’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasSetStream_v2@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasGemmEx@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tonvrtcDestroyProgram@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasHgemm@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tonvrtcGetPTXSize@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaGetErrorString@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to__cudaPopCallConfiguration@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
__cudaRegisterVar@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaRuntimeGetVersion@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaGetDeviceProperties@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaGetLastError' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaStreamCreateWithPriority’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaMalloc' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaMemcpy’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to__cudaRegisterFatBinary@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaRegisterVar’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaFree@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasHgemmStridedBatched@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tonvrtcCompileProgram@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaMemcpyAsync’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaStreamDestroy@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaGetDevice@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaStreamWaitEvent@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaEventDestroy@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaEventSynchronize@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaMallocHost’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaStreamWaitEvent' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaStreamCreate’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaGetDeviceProperties' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cublasScopy_v2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasSgemm_v2@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaDeviceGetAttribute@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaGetDeviceCount@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcGetProgramLog@libnvrtc.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaStreamCreate@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaEventElapsedTime@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaEventRecord@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaDeviceSynchronize@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasCreate_v2@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaRegisterFatBinaryEnd’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaPopCallConfiguration’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to__cudaRegisterFatBinaryEnd@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaStreamSynchronize’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocublasGemmEx' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcGetLoweredName@libnvrtc.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaLaunchKernel@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaMemcpyToSymbol@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocublasDestroy_v2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaStreamAddCallback@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tonvrtcVersion@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaLaunchKernel’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaFuncSetAttribute@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaGetErrorString’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaMemsetAsync@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaStreamDestroy’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaStreamQuery@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasDestroy_v2@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaMemsetAsync' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cublasSgemmEx@libcublas.so.10’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocublasSscal_v2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaMemGetInfo@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmyelin.so: undefined reference tocublasGetProperty@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaMemcpy@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaDeviceReset' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmyelin.so: undefined reference to
cublasLoggerConfigure@libcublas.so.10’
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libmyelin.so: undefined reference tonvrtcGetErrorString@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
__cudaRegisterFunction’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocublasSasum_v2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaMalloc@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tonvrtcGetPTX@libnvrtc.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cublasCreate_v2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaStreamSynchronize@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
nvrtcGetProgramLogSize@libnvrtc.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference tocudaFree' /usr/bin/ld: /usr/lib/libnvinfer_plugin.so: undefined reference to
cudaEventRecord’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocudaCreateChannelDesc@libcudart.so.10.2' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
__cudaPushCallConfiguration@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasSgemmStridedBatched@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaMemcpyAsync@libcudart.so.10.2’
/usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference tocublasSetMathMode@libcublas.so.10' /usr/bin/ld: /usr/lib/libnvinfer.so: undefined reference to
cudaGetLastError@libcudart.so.10.2’
collect2: error: ld returned 1 exit status
make[2]: *** [parsers/onnx/CMakeFiles/getSupportedAPITest.dir/build.make:106: parsers/onnx/getSupportedAPITest] Error 1
make[1]: *** [CMakeFiles/Makefile2:1148: parsers/onnx/CMakeFiles/getSupportedAPITest.dir/all] Error 2
make: *** [Makefile:152: all] Error 2