mirror of
https://github.com/ROCm/jax.git
synced 2025-04-16 11:56:07 +00:00
[Mosaic TPU] Fix operands order in try canonicalize add of matmul.
PiperOrigin-RevId: 671437100
This commit is contained in:
parent
97db78ba24
commit
dba674153e
@ -493,8 +493,9 @@ class CanonicalizeAddOfMatmul : public OpRewritePattern<AddOp> {
|
||||
}
|
||||
return failure();
|
||||
};
|
||||
return success(succeeded(try_canonicalize(op.getLhs(), op.getRhs())) ||
|
||||
succeeded(try_canonicalize(op.getLhs(), op.getRhs())));
|
||||
// We tried try_canonicalize(op.getRhs(), op.getLhs()) and it caused
|
||||
// worrying numerical differences in some of kernels.
|
||||
return try_canonicalize(op.getLhs(), op.getRhs());
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user