This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Shape] Allow `shape.rank` to operate on extent tensors
ClosedPublic

Authored by frgossen on Jul 23 2020, 9:26 AM.

Diff Detail

Event Timeline

frgossen created this revision.Jul 23 2020, 9:26 AM
Herald added a reviewer: silvas. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
pifon2a accepted this revision.Jul 23 2020, 9:31 AM
jpienaar accepted this revision.Jul 23 2020, 2:41 PM
jpienaar added inline comments.
mlir/lib/Dialect/Shape/IR/Shape.cpp
17

clang-tidy: error: 'mlir/include/mlir/Dialect/StandardOps/IR/Ops.h' file not found [clang-diagnostic-error]

(just remove mlir/include part)

578

This one I would relax, as I can see this happening in two steps:

%x = ... : shape // (1)
%0 = shape.rank %x : !shape.size

then we end folding to the point where (1) could be verified to be error free and canonicalized. If we made rank more permissive it would still be valid and we could canonicalize it post rather than flagging as invalid. (also this doesn't lose info and so is valid)

This revision is now accepted and ready to land.Jul 23 2020, 2:41 PM
frgossen updated this revision to Diff 280384.Jul 24 2020, 3:22 AM
frgossen marked 2 inline comments as done.

Address comments

This revision was automatically updated to reflect the committed changes.