diff --git a/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu b/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu index a8715762..8b208e1f 100644 --- a/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu +++ b/src/nvfp4_megamoe_kernel/cutlass_nvfp4_gemm/cutlass_nvfp4_gemm.cu @@ -122,7 +122,7 @@ __global__ void remap_sf_to_cutlass_kernel( if (m >= MN || k_sf >= K_sf) return; // Compute the CUTLASS physical index from logical (m, k_sf) via the layout - int dst_idx = layout_sf(cute::make_coord(m, k_sf)); + int dst_idx = cute::crd2idx(cute::make_coord(m, k_sf), layout_sf); // Read from source (row-major or col-major) and write to CUTLASS position dst[dst_idx] = col_major_src ? src[k_sf * MN + m] : src[m * K_sf + k_sf];