[blackwell][draft] sm100: setup.py _sm100_extensions infra (#224) - #232
Draft
Andrewxu313 wants to merge 2 commits into
Draft
[blackwell][draft] sm100: setup.py _sm100_extensions infra (#224)#232Andrewxu313 wants to merge 2 commits into
Andrewxu313 wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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