Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error: cannot find cuda_bf16.h #930

Open
peizhang-cn opened this issue Jun 13, 2023 · 3 comments
Open

Compile error: cannot find cuda_bf16.h #930

peizhang-cn opened this issue Jun 13, 2023 · 3 comments

Comments

@peizhang-cn
Copy link

Dear all,

I'm new to CUDA and trying to learn CUB for my applications. I try to compile examples (example_block_radix_sort.cu) with: nvcc -arch=sm_75 example_block_radix_sort.cu -I../.. -lcudart -O3, somehow, get a error: cuda_bf16.h: No such file or directory. After searching, seems issues NVIDIA/cub#478 is related, but I cannot find a solution as a beginner. Thanks for your help!

I use WSL2 (ubuntu20.04) and cub1.16.0 with an RTX 3060 ti.

@gevtushenko
Copy link
Collaborator

Hello @peizhang-cn and thank you for the interest to our project!

I was unable to reproduce your issue with CUB 1.16.0. Is there any chance you could try more recent version? Also, which version of CUDA are you using (nvcc --version)? In general, it's better to reuse our CMake infrastructure to build examples:

cmake -DThrust_DIR=/src/thrust/thrust/cmake \
      -DCUB_DISABLE_ARCH_BY_DEFAULT=YES \
      -DCUB_ENABLUE_COMPUTE_75=YES \
      -GNinja \
      ..
ninja cub.cpp14.example.block.radix_sort

@peizhang-cn
Copy link
Author

Hi @senior-zero many thanks for the reply, I reinstalled Thrust and updated Cub to the newest version, and compiled Thrust with cmake -DTHRUST_INCLUDE_CUB_CMAKE=ON .. , it seems to work, but got the following errors after make:

nvcc fatal   : Unknown option 'include/home/pzhang/thrust/testing/fix_clang_nvcc_11.5.h'
make[2]: *** [CMakeFiles/thrust.headers.dir/build.make:76: CMakeFiles/thrust.headers.dir/headers/thrust/addressof.h.cu.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1846: CMakeFiles/thrust.headers.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

the cuda version is 10.1.243.

@gevtushenko
Copy link
Collaborator

@peizhang-cn the minimal required CUDA version for Thrust/CUB is 11.1. I'd suggest installing the latest CUDA, which is 12.1 at the moment.

@jarmak-nv jarmak-nv transferred this issue from NVIDIA/cub Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants