TensorRT icon indicating copy to clipboard operation
TensorRT copied to clipboard

TensorRT v9.2 installation error due to CUDA version. ""-- The CUDA compiler identification is unknown""

Open jamil-z opened this issue 1 year ago • 1 comments

Hello everyone, I'm trying to install TensorRT version 9.2. I followed the requirements and switched to CUDA 12.2 on a 16GB GPU machine running Ubuntu 20.

When I run the command: cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=pwd/out

I get the following error: (venv_tensorrt) azureuser@myUser1:~/cloudfiles/code/Users/myUser/tensorrt/TensorRT/build$ cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=pwd`/out Building for TensorRT version: 8.6.1, library version: 8 -- The CUDA compiler identification is unknown -- Check for working CUDA compiler: /usr/bin/nvcc -- Check for working CUDA compiler: /usr/bin/nvcc -- broken CMake Error at /usr/local/share/cmake-3.15/Modules/CMakeTestCUDACompiler.cmake:46 (message): The CUDA compiler

"/usr/bin/nvcc"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /home/azureuser/cloudfiles/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_a28cd/fast && /usr/bin/make -f CMakeFiles/cmTC_a28cd.dir/build.make CMakeFiles/cmTC_a28cd.dir/build
make[1]: Entering directory '/mnt/batch/tasks/shared/LS_root/mounts/clusters/myUser1/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeTmp'
Building CUDA object CMakeFiles/cmTC_a28cd.dir/main.cu.o
/usr/bin/nvcc     -x cu -c /home/azureuser/cloudfiles/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeTmp/main.cu -o CMakeFiles/cmTC_a28cd.dir/main.cu.o
sh: 1: cicc: not found
make[1]: *** [CMakeFiles/cmTC_a28cd.dir/build.make:66: CMakeFiles/cmTC_a28cd.dir/main.cu.o] Error 127
make[1]: Leaving directory '/mnt/batch/tasks/shared/LS_root/mounts/clusters/myUser1/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a28cd/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:75 (project)

-- Configuring incomplete, errors occurred! See also "/home/azureuser/cloudfiles/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeOutput.log". See also "/home/azureuser/cloudfiles/code/Users/myUser/tensorrt/TensorRT/build/CMakeFiles/CMakeError.log".`

The output of my command: nvcc --version

is as follows: nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2023 NVIDIA Corporation Built on Tue_Jun_13_19:16:58_PDT_2023 Cuda compilation tools, release 12.2, V12.2.91 Build cuda_12.2.r12.2/compiler.32965470_0

From what I understand, it's an error related to CUDA not recognizing its installation correctly, but I've been trying to solve it and can't pinpoint the specific cause. Please, if anyone could help me with this, I would appreciate it.

jamil-z avatar Jan 30 '24 22:01 jamil-z

@rajeevsrao ^ ^

zerollzeng avatar Feb 01 '24 14:02 zerollzeng

@jamil-z , have you tried compile using the docker environment follow the README? thanks!

ttyio avatar Apr 16 '24 16:04 ttyio

closing since no activity for more than 3 weeks, pls reopen if you still have question, thanks all!

ttyio avatar Jul 02 '24 17:07 ttyio