Cuda backend fails to build

Hello everyone, I’m trying to build cuda backend on Ubuntu 22.04.4 LTS Jammy, I have Cuda compilation tools, release 11.5, V11.5.119 installed and NVIDIA-SMI 535.171.04 Driver Version: 551.78 CUDA Version: 12.4. But I get the following error
Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/
/home/claoo/Projects/rust/tfhe-rs/backends/tfhe-cuda-backend/cuda/src/ error: identifier “cudaDevAttrClusterLaunch” is undefined

1 error detected in the compilation of “/home/claoo/Projects/rust/tfhe-rs/backends/tfhe-cuda-backend/cuda/src/”.
make[2]: *** [src/CMakeFiles/tfhe_cuda_backend.dir/build.make:107: src/CMakeFiles/tfhe_cuda_backend.dir/] Error 1
make[1]: *** [CMakeFiles/Makefile2:116: src/CMakeFiles/tfhe_cuda_backend.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Does any of you knows what is the issue. I’m using Ubuntu over Windows 11 with WSL. can this be the issue?


Are you on the latest main? What is your GPU model?


Hi, yes I’m using the latest main and I see that the file with the issue was modified one week ago, and is also a comment on that specific line of code. My GPU is NVIDIA GeForce RTX 3060.


May I ask you to try and build on this branch: chore/gpu/tbcchecksupport, see if it fixes compilation for you? Thank you :pray:

this time I get a different error
– The CXX compiler identification is GNU 11.4.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /usr/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for a CUDA compiler
– Looking for a CUDA compiler - /usr/bin/nvcc
– The CUDA compiler identification is NVIDIA 11.5.119
– Detecting CUDA compiler ABI info
– Detecting CUDA compiler ABI info - done
– Check for working CUDA compiler: /usr/bin/nvcc - skipped
– Detecting CUDA compile features
– Detecting CUDA compile features - done
– CUDA Architecture: -arch=sm_86
– CUDA Version:
– CUDA Path:
– CUDA Libraries:
– CUDA Performance Primitives:
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”)
– Configuring done (7.0s)
– Generating done (0.0s)
– Build files have been written to: /home/claoo/Projects/tfhe-rs/backends/tfhe-cuda-backend/cuda/build
claoo@DESKTOP-6SHLCUU:~/Projects/tfhe-rs/backends/tfhe-cuda-backend/cuda/build$ make
[ 3%] Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/crypto/
[ 6%] Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/crypto/
[ 10%] Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/
[ 13%] Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/fft/
[ 17%] Building CUDA object src/CMakeFiles/tfhe_cuda_backend.dir/integer/
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘…’:
435 | function(_Functor&& __f)
/usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘…’:
530 | operator=(_Functor&& __f)
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
make[2]: *** [src/CMakeFiles/tfhe_cuda_backend.dir/build.make:137: src/CMakeFiles/tfhe_cuda_backend.dir/integer/] Error 1
make: *** [Makefile:146: all] Error 2

Have you followed this guide for Cuda installation on WSL? CUDA on WSL

(Cuda download page: CUDA Toolkit 12.4 Update 1 Downloads | NVIDIA Developer)

1 Like

Thank you very much, problem solved. I reinstall everything from scratch and I manage to build cuda backend.
Happy coding!

1 Like