This is an archive of the discontinued LLVM Phabricator instance.

[ODS] Use Adaptor Trait for Shaped Type Inference

Authored by amandatang on Jul 13 2023, 3:55 PM.



Author inferReturnTypeComponents methods with the Op Adaptor by using the InferShapedTypeOpAdaptor.

Diff Detail

Event Timeline

amandatang created this revision.Jul 13 2023, 3:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2023, 3:55 PM
amandatang requested review of this revision.Jul 13 2023, 3:55 PM
amandatang retitled this revision from Use Adaptor Wrapper Trait for Shaped Type Inference to [ODS] Use Adaptor Trait for Shaped Type Inference.Jul 13 2023, 3:57 PM
amandatang edited the summary of this revision. (Show Details)
amandatang added reviewers: jpienaar, okwank.

clang format

jpienaar added inline comments.Jul 14 2023, 7:58 AM

Why not just rely on overloading?

Use function overloading

amandatang marked an inline comment as done.Jul 14 2023, 10:19 AM
jpienaar accepted this revision.Jul 18 2023, 2:21 PM
This revision is now accepted and ready to land.Jul 18 2023, 2:21 PM
jpienaar added inline comments.Jul 18 2023, 10:29 PM

You are querying inputShape's rank without checking if it was null here. cast is preferred in that case.


MLIR style is to elide trivial braces.

amandatang marked 2 inline comments as done.

Address comments

Clang format

This revision was automatically updated to reflect the committed changes.