pcl
pcl copied to clipboard
GPU kinfu textures no longer supported on CUDA 12.0
Describe the bug
The GPU kinfu does not build with CUDA 12.0 because this version of CUDA dropped legacy texture references (specifically used in marching_cubes.cu
).
Current Behavior
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(51): error: texture is not a template
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(52): error: texture is not a template
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(61): error: identifier "cudaBindTexture" is undefined
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(68): error: identifier "cudaUnbindTexture" is undefined
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(160): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (<error-type>, int)
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(344): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (<error-type>, int)
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(350): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (<error-type>, int)
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(351): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (<error-type>, int)
pcl/gpu/kinfu/src/cuda/marching_cubes.cu(352): error: no instance of overloaded function "tex1Dfetch" matches the argument list
argument types are: (<error-type>, int)
9 errors detected in the compilation of "pcl/gpu/kinfu/src/cuda/marching_cubes.cu".
To Reproduce
docker run -it --rm nvidia/cuda:12.0.0-devel-ubuntu22.04
apt update && apt install -y git cmake libeigen3-dev libflann-dev libgl1-mesa-dev libboost-filesystem-dev libboost-date-time-dev libboost-iostreams-dev
git clone https://github.com/PointCloudLibrary/pcl.git
mkdir pcl/build && cd pcl/build
cmake -DBUILD_CUDA=ON -DBUILD_GPU=ON ..
make -j$(nproc)
Your Environment (please complete the following information):
- OS: Ubuntu 22.04
- Compiler: gcc 11.3.0
- PCL Version: HEAD
- CUDA version: 12.0
Possible Solution
Replace texture references with texture objects.
https://forums.developer.nvidia.com/t/undefined-tex1dfetch-in-kernel/170608/6
Is there a recommended workaround for this issue, beyond reverting to CUDA 11.7? I'm experiencing it as well.
- OS: Ubuntu 20.04
- Compiler: gcc 9.4.0
- PCL Version: 1.13
- CUDA version: 12.1
@Nilaos If you don't need the kinfu module, simply excluding it from compilation should let the rest of PCL build successfully