This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Add RFFT2d operation
ClosedPublic

Authored by lhutton1 on Jan 23 2023, 1:50 AM.

Details

Summary

Adds the RFFT2d TOSA operation and supporting
shape inference function.

Signed-off-by: Luke Hutton <luke.hutton@arm.com>
Change-Id: I7e49c47cdd846cdc1b187545ef76d5cda2d5d9ad

Diff Detail

Event Timeline

lhutton1 created this revision.Jan 23 2023, 1:50 AM
lhutton1 requested review of this revision.Jan 23 2023, 1:50 AM
lhutton1 updated this revision to Diff 491395.Jan 23 2023, 8:31 AM

Updates after a rebase:

  • NoSideEffects -> Pure
  • ShapedType::kDynamicSize -> ShapedType::kDynamic
jpienaar accepted this revision.Jan 23 2023, 8:58 AM
jpienaar added a subscriber: jpienaar.

Nice, thanks. Would you need help in landing?

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
391

Prefer std::optional (I think these are all being flipped)

399

So you'd have an input without rank but a result with? Is rankness verified?

405

And if this were symbolic, we'd have this form too?

E.g., symbolically this would be

(x,y,z) -> (x,y, z/2+1)

?

This revision is now accepted and ready to land.Jan 23 2023, 8:58 AM
lhutton1 added a comment.EditedJan 24 2023, 7:29 AM

Thanks for the review jpienaar, yes I believe I'll need help landing this. I'm hoping to push a fix for the CI failure and address the comments shortly

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
399

Thanks yes this doesn't make sense, I'll change this to return failure when there is no rank

405

Yes that's correct. Apologies if I missed something (I'm very new to MLIR), my thinking was that symbolic shapes are not supported here?

Let me know when ready and I'll take a look (I didn't check failure)

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
405

It isn't here no - I'd like to change that "at some point" :) Feel free to just add a comment to this extent to ease when we come back around here at some point.

lhutton1 updated this revision to Diff 491855.Jan 24 2023, 11:01 AM
lhutton1 marked 2 inline comments as not done.

Addressing review comments regarding type inference.

This is ready for another review

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
405

Thanks, sounds exciting! Added a note

This revision was automatically updated to reflect the committed changes.