Skip to content

[blackwell][draft] sm100: setup.py _sm100_extensions infra (#224) - #232

Draft
Andrewxu313 wants to merge 2 commits into
mainfrom
tairan/blackwell-02-01-setup-infra
Draft

[blackwell][draft] sm100: setup.py _sm100_extensions infra (#224)#232
Andrewxu313 wants to merge 2 commits into
mainfrom
tairan/blackwell-02-01-setup-infra

Conversation

@Andrewxu313

Copy link
Copy Markdown
Contributor

Closes #224. Part of #204 (Blackwell Phase 2).

Summary

Add _sm100_flags (-arch=sm_100a) and empty _sm100_extensions list to batchgen_kernels/setup.py. Wire _build_sm100 gate.

Spec

batchgen-agent-metadata: batchgen_design/blackwell/blackwell-kernel-port-v1.md § Sub-task 1

v-tairan Copilot user and others added 2 commits May 30, 2026 09:24
Placeholder commit for draft PR. Implementation tracked in:
batchgen-agent-metadata/batchgen_design/blackwell/blackwell-kernel-port-v1.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ic kernels

setup.py:
- Add _sm100_flags (-arch=sm_100a, -O3, --use_fast_math) and _sm100_extensions
  list containing the 8 generic-CUDA / SM80-mma.sync extensions that are
  SM100-portable (no SM90a WGMMA/TMA): marlin_grouped_gemm (carries
  -DUSE_BF16_COMPUTE), fp8_blockwise_ops, marlin_transform, _C_routing
  (generic kernels only), dispatch_scatter_3d, fused_kv_norm_rope,
  fused_q_absorb, fused_q_split.
- Wire assembly: if _build_sm90a / elif _build_sm100 / always _sm80.
- WGMMA sources (fused_gate.cu, qkv_wgmma.cu, glm5 uses generic so kept)
  are excluded from the SM100 routing bundle; glm5_router_gemm.cu is generic
  CUDA (warp-shuffle only) and retained.

routing_extension.cc:
- Guard the WGMMA-backed fused_gate_* pybind bindings behind
  #ifdef BATCHGEN_HAS_FUSED_GATE so the SM100 build (which omits fused_gate.cu)
  does not emit an undefined-symbol import error. SM90a build defines the macro.

Verified: BUILD_ARCH=sm100 builds all 8 extensions; all load on B200 (sm_100).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added the ci:run Trigger build + GPU regression on H20 label May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run Trigger build + GPU regression on H20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[blackwell] sm100: setup.py _sm100_extensions infra

1 participant