This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Move `std.tensor_cast` -> `tensor.cast`.
ClosedPublic

Authored by silvas on Dec 15 2020, 4:49 PM.

Details

Diff Detail

Event Timeline

silvas created this revision.Dec 15 2020, 4:49 PM
silvas requested review of this revision.Dec 15 2020, 4:49 PM
silvas updated this revision to Diff 312077.Dec 15 2020, 4:53 PM

Fix a few mentions in comments.

rriddle accepted this revision.Dec 15 2020, 5:20 PM

Looks good, a few nits.

mlir/include/mlir/Dialect/Tensor/IR/Tensor.h
31

Can you start a new comment block to separate this from Tensor Dialect Operations above?

34

Can we remove the reference to MemRef here?

mlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
27

Put this on the previous line?

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
67

nit: Spell out auto here.

69

nit: Can you just merge this if into the parent one?

mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
34

These could just be in the same anonymous namespace.

This revision is now accepted and ready to land.Dec 15 2020, 5:20 PM
silvas updated this revision to Diff 312085.Dec 15 2020, 6:23 PM
silvas marked 4 inline comments as done.

Address River's comments.

mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
69

Actually, ss != st is redundant. (this was the previous code). I simplified it.

mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
34

LLVM coding standard is to keep them small as small as possible so that there is good locality of reference.

https://llvm.org/docs/CodingStandards.html#anonymous-namespaces

"Because of this, we have a simple guideline: make anonymous namespaces as small as possible, and only use them for class declarations. For example:"

herhut added inline comments.Dec 16 2020, 12:38 AM
mlir/integration_test/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir
1

mega-nit: break the line earlier

mlir/integration_test/Dialect/Linalg/CPU/test-subtensor-insert.mlir
1

Mega-nit: break the line earlier

silvas updated this revision to Diff 312304.Dec 16 2020, 2:32 PM
silvas marked an inline comment as done.

Address Stephan's comments.

silvas marked an inline comment as done.Dec 16 2020, 2:37 PM
This revision was landed with ongoing or failed builds.Dec 17 2020, 4:07 PM
This revision was automatically updated to reflect the committed changes.