Add dual-GEMM examples for SM90 (Hopper) and SM120 (Blackwell) #2694
+11,938
−0
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.
Summary
Implements dual-GEMM examples for SM90 (Hopper) and SM120 (Blackwell) using CUTLASS 3.x.
The dual-GEMM operation implemented is:
Implementation details
Based on the single-GEMM examples 48_hopper_warp_specialized_gemm.cu
and 79a_blackwell_geforce_nvfp4_bf16_gemm.cu
B0
andB1
layouts are not decoupled, but both are passed separately to the builders for potential future flexibility.(Blackwell supports only TN layout; Hopper assumes NK layout for make_tma_copy_B_sm90 etc.)
D2
performsLeftSiLUAndMul
similar to example 45_dual_gemm, implemented incollective/sm90_epilogue_tma_warpspecialized_dual.hpp
store()D0
andD1
are intermediate results only and are not stored.Added
template<class Op0, class Op1>
infusion/sm90_callbacks…
to allow distinct operations forD0
andD1
.Performance (keeping all configurations same as single-GEMM examples)
SM90 (Hopper)
SM120 (Blackwell)
Notes
63_hopper_gemm_with_weight_prefetch
.Closes #1123