Russell's compilation error occurs because RMM headers depend on CCCL (CUDA C++ Core Libraries) headers, specifically cuda/stream_ref and cuda/memory_resource. These are header-only libraries that need to be in the compiler's include path.
When using CMake with find_package(rmm), CCCL headers are automatically provided via the CCCL::CCCL target. However, when compiling directly with hipcc, CCCL headers must be explicitly available.
CCCL headers need to be installed and added to the module's CPATH environment variable.
During hipMM installation, copy CCCL headers to the install directory:
# After hipMM install, copy CCCL headers
cp -r $hipMM_build_dir/_deps/libhipcxx-src/include/cuda $hipMM_install_dir/include/Then in the hipMM module file, add:
prepend-path CPATH $hipMM_install_dir/includeCopy CCCL headers to chipStar HIP installation:
cp -r $hipMM_build_dir/_deps/libhipcxx-src/include/cuda $HIP_PATH/include/Then the existing HIP module's CPATH setting should pick them up automatically.
Once CCCL headers are in CPATH (via module), the command should work as-is:
hipcc test.cppThe module's CPATH setting will automatically provide the include path.
If CCCL is not in CPATH, you can explicitly add it:
hipcc -I$hipMM_install_dir/include test.cpp
# OR if CCCL is separate:
hipcc -I$hipMM_install_dir/include -I$CCCL_install_dir/include test.cppAfter adding CCCL to the module, Russell's test should compile:
hipcc test.cpp
# Should no longer get: fatal error: 'cuda/stream_ref' file not found- CCCL is header-only (no libraries to link)
- The error only occurs with direct
hipcccompilation, not with CMake projects - Unit tests pass because they use CMake which provides CCCL automatically