TensorRT
TensorRT copied to clipboard
Cross-compilation fails in CMake with "The CMAKE_CUDA_COMPILER: /usr/local/cuda-11.4/targets/aarch64-linux/bin/nvcc is not a full path to an existing compiler tool."
Description
Cross-compilation fails with error:
"The CMAKE_CUDA_COMPILER:
/usr/local/cuda-11.4/targets/aarch64-linux/bin/nvcc
is not a full path to an existing compiler tool."
Environment
TensorRT Version: 8.4.1 NVIDIA GPU: RTX-3080 NVIDIA Driver Version: 530.30.02 CUDA Version: 11.4 CUDNN Version: Operating System: Ubuntu 20.04 Python Version (if applicable): Tensorflow Version (if applicable): PyTorch Version (if applicable): Baremetal or Container (if so, version): Docker 23.0.5
Steps To Reproduce
-
git checkout 8.4.1
- Fix GPG key issue - Change ubuntu-cross-aarch64.Dockerfile by replacing
RUN dpkg -i /pdk_files/cuda-repo-cross-aarch64*.deb /pdk_files/cuda-repo-ubuntu*_amd64.deb \ && apt-get update \ && apt-get install -y cuda-cross-aarch64 \ && rm -rf /var/lib/apt/lists/*
withRUN dpkg -i /pdk_files/cuda-repo-cross-aarch64*.deb /pdk_files/cuda-repo-ubuntu*_amd64.deb RUN cp /var/cuda-repo-cross-aarch64-ubuntu2004-11-4-local/cuda-647817BB-keyring.gpg /usr/share/keyrings/ RUN cp /var/cuda-repo-ubuntu2004-11-4-local/cuda-A7CFCDD0-keyring.gpg /usr/share/keyrings/ RUN apt-get update \ && apt-get install -y cuda-cross-aarch64 \ && rm -rf /var/lib/apt/lists/*
-
./docker/build.sh --file docker/ubuntu-cross-aarch64.Dockerfile --tag tensorrt-jetpack-cuda11.4
-
./docker/launch.sh --tag tensorrt-jetpack-cuda11.4 --gpus all
-
cd $TRT_OSSPATH mkdir -p build && cd build cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=
pwd/out -DTRT_PLATFORM_ID=aarch64 -DCUDA_VERSION=11.4 CC=/usr/bin/gcc make -j$(nproc)
@rajeevsrao ^ ^
Do you have any progress in this issue?
Yes, I managed to compile it by modifying the following:
In docker/ubuntu-cross-aarch64.Dockerfile, replace:
RUN dpkg -i /pdk_files/cuda-repo-cross-aarch64*.deb /pdk_files/cuda-repo-ubuntu*_amd64.deb \ && apt-get update \ && apt-get install -y cuda-cross-aarch64 \ && rm -rf /var/lib/apt/lists/*
with
`RUN dpkg -i /pdk_files/cuda-repo-cross-aarch64*.deb RUN cp /var/cuda-repo-cross-aarch64-ubuntu2004-11-4-local/cuda-045251B2-keyring.gpg /usr/share/keyrings/ RUN dpkg -i /pdk_files/cuda-repo-ubuntu*_amd64.deb RUN cp /var/cuda-repo-ubuntu2004-11-4-local/cuda-3231754F-keyring.gpg /usr/share/keyrings/
RUN apt-get update
&& apt -y install cuda-toolkit-11-4
&& apt-get install -y cuda-cross-aarch64
&& rm -rf /var/lib/apt/lists/*`
In cmake/toolchains/cmake_aarch64.toolchain, replace:
set(CMAKE_CUDA_COMPILER ${CUDA_TOOLKIT_ROOT_DIR}/bin/nvcc)
with
set(CMAKE_CUDA_COMPILER /usr/local/cuda/bin/nvcc)
I annotated the code of C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include\crt\sm_80_rt.h in line 109 and it can work.
// extern __device__ void *__nv_associate_access_property_impl(const void *,
// unsigned long long);