This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg] Add unsigned min/max/cast function to OpDSL.
ClosedPublic

Authored by gysit on Oct 6 2021, 7:18 AM.

Details

Summary

Update OpDSL to support unsigned integers by adding unsigned min/max/cast signatures. Add tests in OpDSL and on the C++ side to verify the proper signed and unsigned operations are emitted.

The patch addresses an issue brought up in https://reviews.llvm.org/D111170.

Diff Detail

Event Timeline

gysit created this revision.Oct 6 2021, 7:18 AM
gysit requested review of this revision.Oct 6 2021, 7:18 AM

this patch emerged from a discussion in https://reviews.llvm.org/D111170. In case it turns out this solution does not scale due to the number of additional operations we may want to use attributes or a similar mechanism to control signedness.

rsuderman accepted this revision.Oct 6 2021, 10:44 AM
This revision is now accepted and ready to land.Oct 6 2021, 10:44 AM
This revision was automatically updated to reflect the committed changes.