Build failure with CUDA 13.3: CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED not declared
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 778
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
Description
Building nvbandwidth fails because CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED is not defined in the CUDA headers available in my Conda environment.
Build Error
testcase.cpp:61:60: error: ‘CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED’ was not declared in this scope; did you mean ‘CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED’?
61 | CU_ASSERT(cuDeviceGetAttribute(&supportsMulticast, CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED, dev));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ghidora/bandwidth/nvbandwidth/error_handling.h:49:26: note: in definition of macro ‘CU_ASSERT’
49 | CUresult cuResult = (x); \
| ^
make[2]: *** [CMakeFiles/nvbandwidth.dir/build.make:90: CMakeFiles/nvbandwidth.dir/testcase.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/nvbandwidth.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Environment
- CUDA Toolkit: 13.3, installed through Conda
- GPU: NVIDIA L40S
- NVIDIA Driver Version: 595.71.05
- Compiler: g++ 12
- Build system: CMake / Make
Steps to Reproduce
- Create or activate a Conda environment containing CUDA 13.3.
- Configure the
nvbandwidthbuild with CMake. - Run
make. - The build fails while compiling
testcase.cpp.
Expected Behavior
nvbandwidth should build successfully with CUDA 13.3 installed through Conda.
Actual Behavior
The build fails because CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED is not declared in the CUDA headers used during compilation.
Temporary Workaround
Commenting out the following line in testcase.cpp allows the build to complete:
CU_ASSERT(cuDeviceGetAttribute(
&supportsMulticast,
CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED,
dev
));
This is only a temporary workaround because it disables multicast capability detection.
Suggested Fix
Please consider guarding the multicast capability query with an appropriate CUDA version or feature check so that the project can still compile when CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED is unavailable in the installed CUDA headers.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the multicast capability query in testcase.cpp and inspect how the CMake build selects the CUDA headers. Reproduce the failure with CUDA 13.3 from Conda, then verify that the project builds when the attribute is unavailable and still performs multicast capability detection when it is defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100