Page MenuHomePhabricator

[mlir[[vector] Extend Transfer read/write ops to support tensor types.
ClosedPublic

Authored by ThomasRaoux on Dec 17 2020, 4:37 PM.

Details

Summary

Transfer_ops can now work on both buffers and tensor. Right now, lowering of the tensor case is not supported yet.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Dec 17 2020, 4:37 PM
ThomasRaoux requested review of this revision.Dec 17 2020, 4:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2020, 4:37 PM
This revision is now accepted and ready to land.Dec 17 2020, 11:49 PM
bondhugula requested changes to this revision.Dec 19 2020, 10:17 AM
bondhugula added a subscriber: bondhugula.
bondhugula added inline comments.
mlir/include/mlir/Dialect/Vector/VectorOps.td
1294

What does it mean to write to a tensor?! Aren't tensors immutable values wholly? (i.e., you can't change its elements)

mlir/include/mlir/Interfaces/VectorInterfaces.td
50

Typo.

mlir/lib/Dialect/Vector/VectorTransforms.cpp
2407–2408

Nit: Assign to a variable to prevent a repeated call.

This revision now requires changes to proceed.Dec 19 2020, 10:17 AM

Add review comments.

ThomasRaoux marked 2 inline comments as done.Dec 20 2020, 11:55 PM
ThomasRaoux added inline comments.
mlir/include/mlir/Dialect/Vector/VectorOps.td
1294

That's a bad copy paste, I updated the example. The operation returns a new tensor where the vector was inserted into the source tensor.

bondhugula resigned from this revision.Dec 21 2020, 7:39 AM
bondhugula added inline comments.
mlir/include/mlir/Dialect/Vector/VectorOps.td
1294

That makes sense!

This revision is now accepted and ready to land.Dec 21 2020, 7:39 AM