[BUG] FP8 warp specialized gemm failed when m is small
Describe the bug
./54_hopper_fp8_warp_specialized_gemm cannot run with small m (e.g. 1/2/5).
Steps/Code to reproduce bug
1. build 54_hopper_fp8_warp_specialized_gemm
2. run with ./54_hopper_fp8_warp_specialized_gemm --m=2 --n=2048 --k=2048
Output:
Got cutlass error: Invalid status at:489
Environment details (please complete the following information):
docker: nvcr.io/nvidia/cuda:12.1.0-devel-ubuntu22.04 gpu: h100 commit: 033d9efd2db0bbbcf3b3b0650acde6c472f3948e
Did some trials and looks like its related to TmaWarpSpecialized epilogue schedule. In comparison, NoSmemWarpSpecialized schedule works for small m.
TMA epilogue mandates 16B alignment for the leading dimension of C/D tensors. Combined with an 8-bit data type and column-major layout, this translates into the requirement that m is a multiple of 16. If you re-build the code with -DCUTLASS_DEBUG_TRACE_LEVEL=1, you can see this in the output for small m:
sm90_epilogue_tma_warpspecialized.hpp:325 CAN IMPLEMENT: Problem Size doesn't meet the minimum alignment requirements for TMA.
Thank you so much for the explanation.