heir icon indicating copy to clipboard operation
heir copied to clipboard

Test "ElementwiseToAffine" support for ops with both tensor and scalar operands

Open AlexanderViand-Intel opened this issue 1 year ago • 1 comments

The ElementwiseToLinalg pass in MLIR only supports operations where all operands are tensors and this requirement has been left in place for the ElementwiseToAffine pass. However, the reason that this limitation is necessary for the linalg version doesn't exist in the affine version, which should already support scalar operands as-is (well, after replacing the all_of in isElementwiseMappableOpOnRankedTensors with any_of) . However, polynomial operations have a SameOperandsAndResultType constraint, so to test whether this feature actually works as expected, we'd need to either allow mixed tensor-scalar operations and/or simply test this pass with a different ElementwiseMappable op.

AlexanderViand-Intel avatar Mar 15 '24 00:03 AlexanderViand-Intel

This issue has 1 outstanding TODOs:

This comment was autogenerated by todo-backlinks

github-actions[bot] avatar Mar 15 '24 19:03 github-actions[bot]