Skip to content

kernel-builder: support SM103 (Blackwell Ultra / B300) capabilities, e.g. 10.3a #720

Closed

Description

@sayakpaul

Context

While porting NATTEN in kernels-community#1031, the NATTEN author suggested adding 10.3a to the Blackwell kernel section's cuda-capabilities to support Blackwell Ultra ([G]B300) — see this review thread. SM103 was added in CTK 12.9 (NATTEN's own arch-by-CTK reference: pkg_helpers.bash).

Problem

kernel-builder currently has no notion of SM103, so declaring 10.3a in a kernel's build.toml is a silent no-op on every build variant:

  • cuda_archs_loose_intersection (in src/pyproject/templates/utils.cmake) only keeps an a/f-suffixed arch when its exact base is present in the toolkit's target list, and drops unknown archs without error (only an empty intersection is fatal).
  • The target lists in src/pyproject/templates/torch/preamble.cmake contain no 10.3:
    • CTK ≥ 12.8: 7.0;7.2;7.5;8.0;8.6;8.7;8.9;9.0;10.0;10.1;12.0+PTX
    • CTK ≥ 13.0: 7.5;8.0;8.6;8.7;8.9;9.0;10.0;11.0;12.0;12.1+PTX
  • src/cuda_supported_archs.json (used by nix-builder/lib/build.nix as the default capability set) also lacks 10.3.

The intersection mechanism itself would otherwise provide exactly the desired gating for free: with 10.3a declared in a section, cu130/cu132 variants would emit sm_103a while cu128 keeps only 10.0a — no per-kernel version conditionals needed.

Proposed change

  • Add 10.3 to the CTK ≥ 13.0 branch of CUDA_DEFAULT_KERNEL_ARCHS in preamble.cmake (all current SM103-capable build sets — cu130, cu132 — take this branch; there is no cu129 build set).
  • Add 10.3 to src/cuda_supported_archs.json.
  • Possibly worth auditing for other missing family members at the same time (e.g. 12.1 is present only in the CTK 13 list; 11.0 likewise).

Kernels can then opt in per section, e.g. NATTEN's Blackwell section:

[kernel.natten_blackwell]
cuda-minver = "12.8"
cuda-capabilities = ["10.0a", "10.3a"]

Impact until fixed

B300 devices still run kernels whose sections emit plain sm_100 SASS (binary-compatible forward within the major), but arch-specific (100a) CUTLASS kernels cannot be used on SM103, so e.g. NATTEN's Blackwell FNA/FMHA paths are unavailable there.

🤖 Generated with Claude Code

Activity

  1. danieldk commented on Jul 17, 2026

    @danieldk
    Member

    Adding the capability sounds good!

  2. sayakpaul commented on Aug 25, 2026

    @sayakpaul
    MemberAuthor

    Similar problem for Sage Attention Blackwell too. We don't support 12.1. So, we should support it, too.

  3. danieldk commented on Sep 2, 2026

    @danieldk
    Member

    Fixed by #783.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions