Skip to content

Commit df55b86

Browse files
Merge pull request AI-Hypercomputer#4257 from AI-Hypercomputer:amandaliang
PiperOrigin-RevId: 938781956
2 parents 412a918 + 97a4fe1 commit df55b86

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/maxtext/kernels/gather_reduce_pallas.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ def sc_gather_reduce(
9393
mesh=plsc.VectorSubcoreMesh(
9494
core_axis_name="core",
9595
subcore_axis_name="subcore",
96-
num_cores=1 if single_sc else 2,
96+
num_cores=1 if single_sc else sc_info.num_cores,
9797
),
98-
compiler_params=pltpu.CompilerParams(needs_layout_passes=True),
98+
compiler_params=pltpu.CompilerParams(needs_layout_passes=True, use_tc_tiling_on_sc=True),
9999
)
100100
def kernel(in_hbm_ref, idx_hbm_ref, weights_hbm_ref, out_hbm_ref):
101101
row_wave_size = row_chunk_size * lax.axis_size(("core", "subcore"))
@@ -118,7 +118,7 @@ def kernel(in_hbm_ref, idx_hbm_ref, weights_hbm_ref, out_hbm_ref):
118118
def idx_pipeline(idx_ref, weights_ref=None):
119119
row_chunk_idx = subcore_first_row_chunk + pl.program_id(0)
120120

121-
row_subchunk_size = 16
121+
row_subchunk_size = sc_info.num_lanes
122122
out_rows_per_step = row_subchunk_size // reduce_group_size
123123
assert reduce_group_size * out_rows_per_step == sc_info.num_lanes
124124
num_row_subchunks = row_chunk_size // row_subchunk_size

0 commit comments

Comments
 (0)