fix: use cute::crd2idx for SF remap — layout_sf() not directly callable

CuTe Layout objects with hierarchical shapes can't be called directly
with flat (m, k_sf). Use cute::crd2idx(make_coord(m, k_sf), layout_sf)
to convert logical coordinates to physical indices.
This commit is contained in:
2026-05-15 11:39:57 +00:00
parent 9908fd64d9
commit d5949a23b4

View File

@@ -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];