This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add InferReturnTypes for N-ary operations
AbandonedPublic

Authored by rsuderman on Jun 17 2021, 3:59 PM.

Details

Summary

InferReturnTypes enables return type inference based on input types. This
allows op validation of any tosa op that supports broadcasting along with
non-broadcastable TOSA operations.

Diff Detail

Event Timeline

rsuderman created this revision.Jun 17 2021, 3:59 PM
rsuderman requested review of this revision.Jun 17 2021, 3:59 PM
NatashaKnk accepted this revision.Jun 21 2021, 11:50 AM
This revision is now accepted and ready to land.Jun 21 2021, 11:50 AM

Going to change from inferring the full return type to only inferring the shape. This encounters issues during dynamic / underspecified cases (verifiers fail) which makes shape inference required more than it should be.

rsuderman abandoned this revision.Jun 29 2021, 6:04 PM

You probably want to also set the compatible testing, that allows for the shape to be more or less exact and still not be an error. The default is the strictest (inferred type has to equal inferred - I had considered relaxing that with the tensor type helper class.

If this is unclear comment, let me know, quickly typed on mobile