fix: Use is_family_of() for SM90 arch guard in warpgroup MmaOp - #3084
fix: Use is_family_of() for SM90 arch guard in warpgroup MmaOp#3084blake-snc wants to merge 1 commit into
Conversation
Replace hardcoded `arch == Arch.sm_90a` with `arch.is_family_of(Arch.sm_90a)` in warpgroup/mma.py's MmaOp for consistency with the warp-level MMA fix in NVIDIA#3082. While functionally equivalent today (sm_90a is the only Hopper "a"-suffix arch in practice), this makes the arch guard consistent with the is_family_of() pattern and future-proofs against potential Hopper variants. Validated: - is_family_of(Arch.sm_90a) returns True for sm_90a - is_family_of(Arch.sm_90a) returns False for sm_120a, sm_100a Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Ping for review — same |
|
This PR has been labeled |
|
Still relevant on current main ( 131: def __post_init__(self) -> None:
132: # Verify arch
133: arch = BaseDSL._get_dsl().get_arch_enum()
134: if not arch == Arch.sm_90a:
135: raise OpError(
136: self,
137: f"expects arch to be {Arch.sm_90a}, but got {arch}",Pure consistency fix with the Note: commenting to reset the |
|
This PR has been labeled |
|
Responding to the inactivity label: this is still relevant at current main. The guard in |
Summary
arch == Arch.sm_90awitharch.is_family_of(Arch.sm_90a)inwarpgroup/mma.py'sMmaOp.__post_init__Problem
MmaOpinwarpgroup/mma.pyusesif not arch == Arch.sm_90ato guard its arch check. While functionally correct today (sm_90a is the only Hopper "a"-suffix arch), this is inconsistent with theis_family_of()pattern used elsewhere in CuTe DSL (see #3082 for the SM12x equivalent fix).Fix
Validation
sm_90a accepted, non-Hopper arches correctly rejected.
Related
warp/mma.pyContributed by Second Nature Computing (https://joinsecondnature.com)