Combining kind min/max of Vector reduction op has been changed to minf/maxf, minsi/maxsi, and minui/maxui. Modify getVectorReductionOp accordingly.
Add min/max to supported reductions.
Details
Diff Detail
Event Timeline
@nicolasvasilache Thank you for the review. We'll merge it tomorrow if there are no more comments.
Address review comment to add one unit test. Modify getReductionOp and add min/max to supported reduction.
Sorry, I thought we already had tests for this. Thanks, River!
Thanks for adding the test, Amy. Some comments below.
mlir/test/Dialect/Affine/SuperVectorize/vectorize_reduction.mlir | ||
---|---|---|
33 | I think if we follow the other tests, this should be the identity value, i.e., +inf (see 0x7F800000 below). | |
57 | Is this operation only generated for min/max? It should be generated for all the reduction ops but I don't see it in the other tests... You don't have to address this problem in this review but there seems to be something off here. | |
62 | Could you please add a test for maxf and the signed/unsigned variants as well? |
Address review comments to add more tests.
mlir/test/Dialect/Affine/SuperVectorize/vectorize_reduction.mlir | ||
---|---|---|
57 | This is because the initial value is 0, not +inf. I have changed the initial value and this op is no longer generated. |
@dcaballe Thank you for the review. I've added more tests. I'll merge it tomorrow if there are no more comments.
I think if we follow the other tests, this should be the identity value, i.e., +inf (see 0x7F800000 below).