Skip to content

Commit fb2e693

Browse files
authored
[KERNELS] multiply gammas after fused act (#7027)
follow-up to triton-lang/triton#7003
1 parent fe8ee0c commit fb2e693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/triton_kernels/triton_kernels/matmul_ogs_details/_matmul_ogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ def _matmul_ogs(
301301
w_scale = load_scale(WScale)
302302
acc *= x_scale * w_scale
303303
acc = acc + bias[None, :] * betas[:, None]
304-
acc *= gammas[:, None]
305304
if out_alpha is not None:
306305
acc *= out_alpha
307306
if ACTIVATION_FN is not None:
@@ -312,6 +311,7 @@ def _matmul_ogs(
312311
else:
313312
tl.static_assert(ACTIVATION_REDUCTION_N == 1, "Activation reduction must be 1 if no activation fn is provided")
314313
out = acc
314+
out *= gammas[:, None]
315315
# write-back
316316
Y += start_z.to(index_type) * stride_y_z
317317
if WriteBackIndx is not None:

0 commit comments

Comments
 (0)