Skip to content

Commit 7c8aee4

Browse files
Turn off FMA contraction by default (#4545)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent eaffba4 commit 7c8aee4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

third_party/intel/triton_xpu.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ void init_triton_intel(py::module &&m) {
295295
for (Instruction &inst : instructions(func)) {
296296
if (auto *op = dyn_cast<FPMathOperator>(&inst)) {
297297
FastMathFlags FMF;
298-
// Default to allow contract when default fp fusion is not disabled.
299-
if ((!enableFpFusion.has_value() || enableFpFusion.value()) &&
298+
// Allow contract when default fp fusion is enabled.
299+
if ((enableFpFusion.has_value() && enableFpFusion.value()) &&
300300
!fastMath.has_value()) {
301301
if (op->getOpcode() == Instruction::FAdd ||
302302
op->getOpcode() == Instruction::FMul)

0 commit comments

Comments
 (0)