This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Support masked N-D vector transfer ops in ProgressiveVectorToSCF.
ClosedPublic

Authored by springerm on Apr 22 2021, 11:10 PM.

Details

Summary

Mask vectors are handled similar to data vectors in N-D TransferWriteOp. They are copied into a temporary memory buffer, which can be indexed into with non-constant values.

Depends On D101132

Diff Detail

Event Timeline

springerm created this revision.Apr 22 2021, 11:10 PM
springerm requested review of this revision.Apr 22 2021, 11:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2021, 11:10 PM

Nice progressive lowering!

mlir/lib/Conversion/VectorToSCF/ProgressiveVectorToSCF.cpp
260

Can we make put this one also under Strategy (for locality of similar code and ease of reading in the future) ?

553

Would be good to update the doc too plz.

mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir
103

I would start moving these checks to interleave each of them just above the line they test + add some newlines as it is becoming a little hard to read and match.
I'd probably also go for some CHECK + CHECK-SAME to make it look like 2-d matrices and make it easier to read.

This revision is now accepted and ready to land.Apr 23 2021, 12:44 AM
springerm updated this revision to Diff 339955.Apr 23 2021, 2:11 AM

(new export)

This revision was landed with ongoing or failed builds.Apr 23 2021, 2:24 AM
This revision was automatically updated to reflect the committed changes.
springerm added inline comments.Apr 23 2021, 2:28 AM
mlir/lib/Conversion/VectorToSCF/ProgressiveVectorToSCF.cpp
260

Strategy is defined as

template<typename OpTy>
struct Strategy;

So I cannot add a function that is shared by each template instantiation. I could define a superclass, but I wanted to avoid making the design more complex.

I'm thinking of putting the 1D and the N-D versions in separate namespaces in a new commit. That should also make clear what belongs together.

springerm added inline comments.Apr 23 2021, 2:31 AM
mlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir
103

I'm reorganizing all the tests in a separate commit together with memref layout map support. Basically, each test will run multiple times, but with different layout maps.

Will move the CHECKs together with that.