Skip to content

cuda: build with CUDA 13 and target Blackwell - #3715

Draft
melonakos wants to merge 4 commits into
masterfrom
fix/cuda-13-build
Draft

melonakos wants to merge 4 commits into
masterfrom
fix/cuda-13-build

Conversation

@melonakos

@melonakos melonakos commented Sep 10, 2026

Copy link
Copy Markdown
Member

Builds the CUDA backend with CUDA 13 and adds Blackwell (sm_100 through sm_121) as a target. Fixes #3688 and #3695.

This is #3698 rebased onto master with three commits on top; it supersedes #3698 and #3696 and includes #3706. The commits on top fix what was still broken: CMake's bundled arch-selection function was shadowing ours, the default arch list still handed nvcc 13 a removed target (nvcc fatal : Unsupported gpu architecture 'compute_70'), CUDA 13 moved its Windows DLLs to bin/x64 so standalone installs found nothing, and JIT targets now come from nvrtcGetSupportedArchs instead of a hand-kept table.

Verified with a full afcuda build on CUDA 13.0 with MSVC. There is no NVIDIA GPU on the build machine, so nothing has run on hardware, and Linux is untested. Draft until someone with a Blackwell or Turing card under CUDA 13 runs the tests.

Update CUDA and driver mappings. Update cuFFT and cuSolver library versions. Fixes for depricated interfaces.
CUDA 13 dropped sm_50 through sm_72, but the arch lists still handed nvcc a removed target, and AFcuda_helpers called the arch-selection function before our select_compute_arch was included, so CMake's bundled copy ran and rejected "12.0". Include ours first, drop the retired architectures at 13.0, add a Blackwell name, and update the device manager tables: JIT maximum compute, minimum compute encoded as major*10+minor so 13 can require 7.5, Blackwell cores per SM, Jetson Thor, driver floors, and clockRate read through cudaDeviceGetAttribute since the struct field is gone. CUDA 13 ships cuSPARSE as major version 12, so collect that name for standalone installs.
The hand-kept max-compute table cannot express CUDA 12.8 supporting 10.0 and 12.0 but neither 10.3 nor 11.0, and its minor-only clamp let unsupported devices through, so ask nvrtcGetSupportedArchs for the highest supported architecture at or below the device and keep the table only as a fallback. CUDA 13 moved its Windows DLLs to bin/x64 and afcu_collect_libs treated LIB_MINOR 0 as false, so standalone installs found nothing; search bin/x64 with NO_DEFAULT_PATH and test DEFINED. Maxwell and Pascal removal moves to 13.0 where nvcc actually drops them, the common set's PTX entry is 10.0 so datacenter Blackwell and Thor have something to JIT from, and auto-detection skips cards the toolkit no longer targets instead of aborting the build.
List sm_90 under CUDA 11.8 where it shipped, add sm_110 to the Blackwell name from 13.0, guard the Linux library lookup with NO_DEFAULT_PATH and make a missing redistributable a configure-time error, include cuda.h explicitly in cufft.cu, and delete the unused checkDeviceWithRuntime.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Build] "CUFFT_INCOMPLETE_PARAMETER_LIST" is undefined when using cuda 13

2 participants