[QST] Where is the actual MMA (a * b + c) implemented for SM70 SIMT convolution kernels?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.5k
- Forks
- 2.1k
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 7
Description
Hi, I’m using CUTLASS on an SM70 GPU to implement 2D convolutions via the implicit GEMM path, and I’m trying to understand precisely where the multiply–accumulate at the elemental level (a * b + c) is implemented in the source code for my configuration.
My setup:
- Architecture: SM70
- Convolution:
conv2d_fpropusing the implicit GEMM kernel
(cutlass::conv::kernel::ImplicitGemmConvolutionfrom
include/cutlass/conv/kernel/implicit_gemm_convolution.h) - Kernel name observed in Nsight Systems: something like
cutlass_sm70_simt_sfprop_optimized_128x128_8x2_nhwc_align1
(so it’s a SIMT conv kernel, not TensorOp-based)
From the documentation and code I understand:
- The high-level conv kernel is
ImplicitGemmConvolution, which uses a threadblock-level MMA (e.g.ImplicitGemmPipelined/ImplicitGemmMultistage) that in turn calls a warp-level MMA such asgemm::warp::MmaSimtininclude/cutlass/gemm/warp/mma_simt.h. - At the lowest level,
include/cutlass/arch/mma.hdefinescutlass::arch::Mmaand provides a specialization forGemmShape<1,1,1>, 1where you can clearly seed[0] = a[0] * b[0] + c[0];. - For SM70,
include/cutlass/arch/mma_sm70.hadds architecture-specific specializations ofarch::Mmafor TensorCore shapes. However, there is no obviousa * b + cin plain C++ there; it seems to be implemented through WMMA /mma.syncintrinsics.
My questions are:
-
For a SIMT convolution kernel on SM70 like
cutlass_sm70_simt_sfprop_optimized_128x128_8x2_nhwc_align1, which concreteMmaimplementation is actually instantiated and used?- Is the elemental
a * b + ccoming from a SIMT path ingemm::warp::MmaSimt/gemm::thread::Mma(with FFMA instructions), completely bypassingarch::Mma? - Or is there still an
arch::Mma<...>specialization involved even for the SIMT kernels?
- Is the elemental
-
In other words, if I want to instrument or modify the point where each element of the A and B tiles is multiplied and accumulated into C (for research on masking / fault tolerance), what is the recommended spot in the codebase for an SM70 SIMT conv kernel?
arch/mma.h(theGemmShape<1,1,1>, 1specialization) seems more like a reference / fallback.arch/mma_sm70.happears to target TensorOps rather than SIMT.- Should I instead focus on the SIMT micro-kernels under
include/cutlass/gemm/warp/mma_simt.h(or related thread-level MMA code) for this architecture and kernel type?
-
Finally, is there a canonical “call chain” for the SIMT implicit GEMM conv kernels (e.g.
ImplicitGemmConvolution → ImplicitGemmPipelined/Multistage → gemm::warp::MmaSimt → [thread-level MMA]) that you recommend following if we want to understand or alter the per-element MMA behavior?
Any clarification or pointers to the relevant specializations/files for the SM70 SIMT path would be very helpful. Thanks a lot for maintaining CUTLASS and for any guidance you can provide!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the named entry points from include/cutlass/conv/kernel/implicit_gemm_convolution.h through ImplicitGemmPipelined or ImplicitGemmMultistage and include/cutlass/gemm/warp/mma_simt.h. Compare the related thread-level MMA code with include/cutlass/arch/mma.h and include/cutlass/arch/mma_sm70.h. Done means documenting the concrete SM70 SIMT call chain and the appropriate instrumentation point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100