Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion python/cudnn/sdpa/fwd/kernels/prefill_d128_fp8_sm100.py
Original file line number Diff line number Diff line change
Expand Up @@ -1925,14 +1925,18 @@ def _tma_swz(byte_w: int):
# THD: build the per-batch O descriptor array, then launch the exact
# flat batch-outermost grid (n_thd_units host-computed); grid_x = units*CGA_M.
# Works at cga1 (CGA_M=1) and cga2.
# Per-token element stride of packed O (QH * d_v) — NOT CFG.TILE_O,
# which is only coincidentally right at QH == 1 and otherwise lands
# every batch >= 1's descriptor base inside earlier batches' rows
# (the f16 kernel carries the same fix).
_build_o_descs_kernel(
o_tensor,
tma_o_desc,
o_desc_words,
seq_kv_lens_tensor,
cutlass.Int32(QH),
cutlass.Int32(B),
cutlass.Int32(CFG.TILE_O),
cutlass.Int32(o_tensor.stride[1]),
).launch(grid=(1, 1, 1), block=(32, 1, 1), stream=stream)
grid_shape = (n_thd_units * cutlass.Int32(CFG.CGA_M), cutlass.Int32(1), cutlass.Int32(1))
else:
Expand Down