Skip to content

Commit bc10f6b

Browse files
authored
Fix the issue with XCD remapping logic (#713)
1 parent 7613c4d commit bc10f6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/perf-kernels/tools/tune_gemm/matmul_kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def matmul_kernel(a_ptr, b_ptr, c_ptr, bias_ptr, M, N, K, stride_am, stride_ak,
2424
if NUM_XCDS != 1:
2525
## pid remapping on xcds
2626
# Number of pids per XCD in the new arrangement
27-
pids_per_xcd = GRID_MN // NUM_XCDS
27+
pids_per_xcd = (GRID_MN + NUM_XCDS - 1) // NUM_XCDS
2828
# Compute current XCD and local pid within the XCD
2929
xcd = pid % NUM_XCDS
3030
local_pid = pid // NUM_XCDS

0 commit comments

Comments
 (0)