[Bugfix] Fix int32 overflow in DeepGEMM SiLU/mul FP8 Triton kernel (#42201)
Signed-off-by: vensen <vensenmu@gmail.com> Signed-off-by: Vensen <vensenmu@gmail.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
parent
cf0d279142
commit
6fdb49392e
@@ -171,7 +171,7 @@ def _silu_mul_quant_fp8_packed_kernel(
|
||||
|
||||
pid_pack = tl.program_id(0)
|
||||
pid_m = tl.program_id(1)
|
||||
m_offset = pid_m * BLOCK_M
|
||||
m_offset = pid_m.to(tl.int64) * BLOCK_M
|
||||
|
||||
if m_offset >= M:
|
||||
return
|
||||
@@ -321,8 +321,8 @@ def _silu_mul_per_token_group_quant_fp8_colmajor(
|
||||
pid_n = tl.program_id(1)
|
||||
N_2 = N // 2
|
||||
|
||||
m_offset = pid_m * BLOCK_M
|
||||
n_offset = pid_n * BLOCK_N
|
||||
m_offset = pid_m.to(tl.int64) * BLOCK_M
|
||||
n_offset = pid_n.to(tl.int64) * BLOCK_N
|
||||
if m_offset >= M:
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user