Skip to content

Commit e1a432d

Browse files
Hot fix of #4197 (#4201)
We should use `TRITON_DEFAULT_FP_FUSION` to disallow `mul+add->fma` fusion. Signed-off-by: Whitney Tsang <[email protected]>
1 parent 4061fb7 commit e1a432d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/intel/triton_xpu.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,8 @@ void init_triton_intel(py::module &&m) {
304304
// Default to allow contract when default fp fusion is not disabled.
305305
if ((!enableFpFusion.has_value() || enableFpFusion.value()) &&
306306
!fastMath.has_value()) {
307-
if (isa<AddOperator>(op) || isa<MulOperator>(op))
307+
if (op->getOpcode() == Instruction::FAdd ||
308+
op->getOpcode() == Instruction::FMul)
308309
FMF.setAllowContract(true);
309310
} else if (fastMath.has_value() && fastMath.value())
310311
FMF.setFast(true);

0 commit comments

Comments
 (0)