Skip to content

Conversation

Copy link

Copilot AI commented Feb 6, 2026

CUDA 13.x drops support for SM < 70 architectures and introduces stricter host compiler checks. The existing atomicAdd(double*) fallback guard and build flags needed updating.

csrc/atomics.cuh

  • Fixed conditional for CAS-based atomAdd(double*) fallback: changed (__CUDA_ARCH__ < 600 || CUDA_VERSION < 8000)(__CUDA_ARCH__ < 600) && (CUDA_VERSION < 13000). The original || was also semantically wrong—it would force the CAS path on SM 600+ when CUDA_VERSION < 8000, despite native support being available. Under CUDA 13.x the entire fallback branch is now correctly excluded since SM < 60 targets cannot exist.

setup_ops.py

  • Added --allow-unsupported-compiler to nvcc flags when cuda_major >= 13 to handle stricter host compiler certification checks in the new toolkit.

Note: GPU architecture list for CUDA 13.x (Turing, Ampere, Ada, Hopper, Blackwell) was already present. All .cu kernels use standard device intrinsics (atomicCAS, __ldg, __shfl_{up,down}_sync) that remain supported—no kernel changes needed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • developer.nvidia.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)
  • docs.nvidia.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

这个仓库似乎没有适配cuda13.x版本,请帮我适配到cuda13.x,另外

  1. 尽量不要改动无关代码
  2. 开发时,请你保持良好的编码规范,对新增或者修改的代码添加适当的注释

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Update atomics.cuh: fix conditional compilation for atomAdd(double*)
  to properly exclude CAS-based fallback on CUDA 13.x (SM 70+ only)
- Update setup_ops.py: add --allow-unsupported-compiler nvcc flag for
  CUDA 13.x to handle stricter host compiler version checks

Co-authored-by: HydrogenSulfate <23737287+HydrogenSulfate@users.noreply.github.com>
Copilot AI changed the title [WIP] Adapt repository for CUDA 13.x compatibility Adapt CUDA kernels and build system for CUDA 13.x compatibility Feb 6, 2026
Copilot AI requested a review from HydrogenSulfate February 6, 2026 03:58
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.

2 participants