[Mlir-commits] [mlir] [mlir][arith] Add neutral element support to arith.maxnumf/arith.minnumf (PR #93278)
donald chen
llvmlistbot at llvm.org
Fri May 24 18:36:31 PDT 2024
cxy-1993 wrote:
> I'm a little bit confused -- the change seems to only be related to atomic operations but the PR description doesn't mention this. Aren't there any other places that rely on neutral elements for arith ops? There are no tests either.
This PR primarily supports the neutral element for MaxNumFOp and MinNumFOp, and adds initial values for the corresponding atomicKind without modifying the atomic operations. The current application scenario for the neutral element is to provide an initial value when tile the reduction axis in a linalg op. I did not add new tests because the implementation itself is straightforward and simple. Moreover, adding a linalg reduce test is quite far from this function, and the linalg reduce also doesn't test all the arithmetic operations for reduction. I'm not sure if you would accept this. If you insist on adding tests, I can add a linalg reduce unit test for this patch.
https://github.com/llvm/llvm-project/pull/93278
More information about the Mlir-commits
mailing list