Skip to content

Commit 0e9706c

Browse files
authored
[KERNELS] fix handling of opt_flags.idle_sms (#7211)
1 parent 65167dc commit 0e9706c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/triton_kernels/triton_kernels/matmul_ogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def matmul_ogs(x, w, bias,
705705
)
706706
# matrix multiplication
707707
n_cta = batch_size * grid_m * grid_n * opt_flags.split_k
708-
n_cta = min(target_info.num_sms(), n_cta) if opt_flags.is_persistent else n_cta
708+
n_cta = min(target_info.num_sms() - opt_flags.idle_sms, n_cta) if opt_flags.is_persistent else n_cta
709709
flex = precision_config.flex_ctx
710710
bias_stride = None if bias is None else bias.stride(0)
711711
num_indx = None if scatter_indx is None else scatter_indx.src_indx.shape[0]

0 commit comments

Comments
 (0)