diff --git a/_extra/demo/tile_distributed.html b/_extra/demo/tile_distributed.html
index 51e61c3e..8cb2f4e1 100644
--- a/_extra/demo/tile_distributed.html
+++ b/_extra/demo/tile_distributed.html
@@ -85,7 +85,7 @@
GPU Mesh (2×2)
// ── Mapping functions ──────────────────────────────────────────
// Fully Sharded (S0S1):
-// S[(2, 4, 2, 4) : (1@gpuid_y, 4@m, 1@gpuid_x, 1@m)]
+// S[(2, 2, 4, 4) : (1@gpuid_y, 1@gpuid_x, 4@m, 1@m)]
// rows split by 2 → gpuid_y, cols split by 2 → gpuid_x
function shardGpus(r, c) {
const gy = Math.floor(r / 4), gx = Math.floor(c / 4);
@@ -185,7 +185,7 @@ GPU Mesh (2×2)
// Layout notations
const notations = {
- shard: 'Layout: S[(2,4,2,4) : (1@gpuid_y, 4@m, 1@gpuid_x, 1@m)]',
+ shard: 'Layout: S[(2,2,4,4) : (1@gpuid_y, 1@gpuid_x, 4@m, 1@m)]',
replica: 'Layout: S[(2,4,8) : (1@gpuid_y, 8@m, 1@m)] + R[2 : 1@gpuid_x]',
offset: 'Layout: S[(2,4,8) : (1@gpuid_y, 8@m, 1@m)] + O[1@gpuid_x]',
};
@@ -313,8 +313,8 @@ GPU Mesh (2×2)
const addr = localAddr(gpus[0], loc.lr, loc.lc);
html = `Element ${r*N+c} at (row=${r}, col=${c})
`;
html += '';
- html += `addr = (row // 4) × 1@gpuid_y + (row % 4) × 4@m + (col // 4) × 1@gpuid_x + (col % 4) × 1@m
`;
- html += ` = (${r} // 4) × 1@gpuid_y + (${r} % 4) × 4@m + (${c} // 4) × 1@gpuid_x + (${c} % 4) × 1@m
`;
+ html += `addr = (row // 4) × 1@gpuid_y + (col // 4) × 1@gpuid_x + (row % 4) × 4@m + (col % 4) × 1@m
`;
+ html += ` = (${r} // 4) × 1@gpuid_y + (${c} // 4) × 1@gpuid_x + (${r} % 4) × 4@m + (${c} % 4) × 1@m
`;
html += ` = ${gy}@gpuid_y + ${gx}@gpuid_x + ${addr}@m`;
html += '
';
} else if (ST.mode === 'replica') {
diff --git a/zh/_extra/demo_zh/tile_distributed.html b/zh/_extra/demo_zh/tile_distributed.html
index 8eccbb15..1df91003 100644
--- a/zh/_extra/demo_zh/tile_distributed.html
+++ b/zh/_extra/demo_zh/tile_distributed.html
@@ -85,7 +85,7 @@ GPU Mesh (2×2)
// ── Mapping functions ──────────────────────────────────────────
// Fully Sharded (S0S1):
-// S[(2, 4, 2, 4) : (1@gpuid_y, 4@m, 1@gpuid_x, 1@m)]
+// S[(2, 2, 4, 4) : (1@gpuid_y, 1@gpuid_x, 4@m, 1@m)]
// rows split by 2 → gpuid_y, cols split by 2 → gpuid_x
function shardGpus(r, c) {
const gy = Math.floor(r / 4), gx = Math.floor(c / 4);
@@ -185,7 +185,7 @@ GPU Mesh (2×2)
// Layout notations
const notations = {
- shard: 'Layout: S[(2,4,2,4) : (1@gpuid_y, 4@m, 1@gpuid_x, 1@m)]',
+ shard: 'Layout: S[(2,2,4,4) : (1@gpuid_y, 1@gpuid_x, 4@m, 1@m)]',
replica: 'Layout: S[(2,4,8) : (1@gpuid_y, 8@m, 1@m)] + R[2 : 1@gpuid_x]',
offset: 'Layout: S[(2,4,8) : (1@gpuid_y, 8@m, 1@m)] + O[1@gpuid_x]',
};
@@ -313,8 +313,8 @@ GPU Mesh (2×2)
const addr = localAddr(gpus[0], loc.lr, loc.lc);
html = `Element ${r*N+c} 位于 (row=${r}, col=${c})
`;
html += '';
- html += `addr = (row // 4) × 1@gpuid_y + (row % 4) × 4@m + (col // 4) × 1@gpuid_x + (col % 4) × 1@m
`;
- html += ` = (${r} // 4) × 1@gpuid_y + (${r} % 4) × 4@m + (${c} // 4) × 1@gpuid_x + (${c} % 4) × 1@m
`;
+ html += `addr = (row // 4) × 1@gpuid_y + (col // 4) × 1@gpuid_x + (row % 4) × 4@m + (col % 4) × 1@m
`;
+ html += ` = (${r} // 4) × 1@gpuid_y + (${c} // 4) × 1@gpuid_x + (${r} % 4) × 4@m + (${c} % 4) × 1@m
`;
html += ` = ${gy}@gpuid_y + ${gx}@gpuid_x + ${addr}@m`;
html += '
';
} else if (ST.mode === 'replica') {