From 69680a49f993c3a7af7a5fc78b4e6f7d1cb09498 Mon Sep 17 00:00:00 2001 From: Shihao Xu Date: Tue, 7 Jul 2026 14:11:19 -0700 Subject: [PATCH] fix: align S[...] notation with address formula in Tile Layout section The dimension names were listed as (tile_row, row_in_tile, tile_col, col_in_tile) but the address formula below computes in the order (tile_row, tile_col, row_in_tile, col_in_tile) with strides (16, 8, 4, 1). Updated S[(4, 2, 2, 4) : (16, 4, 8, 1)] to S[(4, 2, 2, 4) : (16, 8, 4, 1)] and reordered the dimension names to match. --- chapter_data_layout/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter_data_layout/index.md b/chapter_data_layout/index.md index c6128117..95f83028 100644 --- a/chapter_data_layout/index.md +++ b/chapter_data_layout/index.md @@ -84,11 +84,11 @@ So far we have described layouts for whole tensors. GPU kernels, however, rarely entire matrix at once; they work on smaller tiles, which are loaded, transformed, and computed on by different parts of the hardware. The good news is that tiling asks for nothing new. It is still just a layout, only now written with a few more dimensions. Cut an 8×8 matrix into 2×4 tiles and we -get a 4-D layout, with coordinates `(tile_row, row_in_tile, tile_col, col_in_tile)` and strides +get a 4-D layout, with coordinates `(tile_row, tile_col, row_in_tile, col_in_tile)` and strides chosen so that each tile stays contiguous: ```text -S[(4, 2, 2, 4) : (16, 4, 8, 1)] +S[(4, 2, 2, 4) : (16, 8, 4, 1)] ``` A logical `(i, j)` first becomes `(i//2, j//4, i%2, j%4)` and then runs through the strides. What is