Skip to content

Add CUDA 13.x support - #4987

Open
preslaff wants to merge 1 commit into
kaldi-asr:masterfrom
preslaff:cuda-13-support
Open

Add CUDA 13.x support#4987
preslaff wants to merge 1 commit into
kaldi-asr:masterfrom
preslaff:cuda-13-support

Conversation

@preslaff

Copy link
Copy Markdown

CUDA 13 currently fails at two points:

  1. ./configure --use-cuda=yes rejects it: "Unsupported CUDA version 13_1" (no 13_* case).
  2. cudamatrix/cu-device.cc fails to compile: CUDA 13 removed cudaDeviceProp::computeMode.

This PR:

  • adds the 13_* case to configure — host g++ bound of <= 15 taken from CUDA 13's own crt/host_config.h (#if __GNUC__ > 15 error), CUSOLVER=true as for 12.x;
  • adds default CUDA_ARCH gencode lists for 13.x (x86_64/ppc64le and aarch64) — CUDA 13 dropped all pre-Turing gencodes, so the minimum is sm_75, and Blackwell (sm_100/sm_120) is included since those GPUs are the main reason users end up on CUDA 13;
  • replaces the computeMode struct read in CuDevice::IsComputeExclusive() with cudaDeviceGetAttribute(cudaDevAttrComputeMode, ...), which is available in every toolkit version Kaldi supports, so the change is backward-compatible.

Tested: CUDA 13.1, driver 595.71, RTX 5070 Ti (sm_120), g++ 13.3, Ubuntu 24.04, MKL. Clean full build; cuda-gpu-available passes its GPU computation test; nnet3 training runs on GPU.

🤖 Generated with Claude Code

- configure: accept CUDA 13.x (host g++ <= 15 per crt/host_config.h) and
  add default CUDA_ARCH gencode lists for it; CUDA 13 dropped all
  pre-Turing gencodes, so the minimum is sm_75.
- cu-device.cc: CUDA 13 removed cudaDeviceProp::computeMode; query the
  compute mode via cudaDeviceGetAttribute(cudaDevAttrComputeMode) instead,
  which is available on all toolkit versions Kaldi supports.

Tested: CUDA 13.1, driver 595.71, RTX 5070 Ti (sm_120), g++ 13.3 (Ubuntu
24.04), MKL. Clean full build; cuda-gpu-available passes its GPU
computation test.
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.

1 participant