Open semchan opened 4 years ago
Hi, My gcc version is 7.5.0, try update gcc.
hi, I follow your suggestion to build this firstly, but I got the below errors, would you please help me? maybe the gcc version or something is not correct. thanks a lot.
[ 1%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_memcpyPermute.cu.o [ 3%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_tensorMeanVar.cu.o [ 4%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_repeatDims.cu.o /media/sem/DATA/quantization/amirstan_plugin/include/amir_cuda_util/cuda_util.h(42): error: identifier "nullptr" is undefined
/media/sem/DATA/quantization/amirstan_plugin/include/amir_cuda_util/cuda_util.h(45): error: identifier "nullptr" is undefined
updating gcc version to v7 via command as follow, and then issue will be resolved:
add-apt-repository ppa:jonathonf/gcc-7.1
sudo apt-get update
sudo apt-get install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
I add the following line to the CMakeLists.txt on CentOS with gcc 7.5.0
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11 -D__CORRECT_ISO_CPP11_MATH_H_PROTO")
https://github.com/Theano/Theano/issues/4588#issuecomment-223985745
Check your cmake version,the default version is 2.8, and update to a higher one, such as 3.14.4
@svmsunny thanks for the advice. I will update cmake version later.
It is bad style to change the compiler version on the system. Use cmake flags instead:
cmake -DTENSORRT_DIR=<trt_dir> -DCMAKE_CXX_COMPILER=/usr/bin/g++-8 -DCMAKE_C_COMPILER=gcc-8 ..
@grimoire I propose to indicate in the readme that the version of the compiler gcc-9 is not supported, which comes with the kernel - 5.4.0-58, and it is necessary to install an additional version of gcc-8
@Maxfashko Thanks for the advice. I am not so familiar with linux kernel. Did that means there will be an ABI error when compile the project with gcc-9 ? Will it be fixed when nvidia provide a build of TensorRT for ubuntu20.04 ?
hi, I follow your suggestion to build this firstly, but I got the below errors, would you please help me? maybe the gcc version or something is not correct. thanks a lot.
[ 1%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_memcpyPermute.cu.o [ 3%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_tensorMeanVar.cu.o [ 4%] Building NVCC (Device) object src/amir_cuda_util/CMakeFiles/amir_cuda_util.dir/amir_cuda_util_generated_repeatDims.cu.o /media/sem/DATA/quantization/amirstan_plugin/include/amir_cuda_util/cuda_util.h(42): error: identifier "nullptr" is undefined
/media/sem/DATA/quantization/amirstan_plugin/include/amir_cuda_util/cuda_util.h(45): error: identifier "nullptr" is undefined