Page MenuHomePhabricator

Fold full-size subview of static shapes.
ClosedPublic

Authored by asaadaldien on Feb 24 2021, 5:25 PM.

Diff Detail

Event Timeline

asaadaldien created this revision.Feb 24 2021, 5:25 PM
asaadaldien requested review of this revision.Feb 24 2021, 5:25 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2021, 5:25 PM

Fix check-label name

rriddle added inline comments.Mar 1 2021, 11:24 AM
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3507

Can you add local variables for the ShapedType of source() and getResult()? Would simplify here and above.

Use local {result|source}shapedType variables

rriddle added inline comments.Mar 1 2021, 4:42 PM
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3506

Are all of these cases just handling the situation where the input and output type are the same?

asaadaldien added inline comments.Mar 1 2021, 8:38 PM
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3506

This can be type equality in the static case.

rriddle added inline comments.Mar 2 2021, 3:20 PM
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3506

Can you just write it using type comparison then? Type comparison is O(1), whereas shape comparison is O(N). Both of these if statements are handling static shapes.

Use shaped-type equality

asaadaldien marked an inline comment as done.Mar 3 2021, 9:25 PM
asaadaldien added inline comments.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
3506

Done! but hasStaticShape() itself is O(N)

rriddle accepted this revision.Mar 3 2021, 10:57 PM
This revision is now accepted and ready to land.Mar 3 2021, 10:57 PM
This revision was automatically updated to reflect the committed changes.
asaadaldien marked an inline comment as done.