This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vectorToGPU] Fix type used when folding transpose into read op
ClosedPublic

Authored by ThomasRaoux on Feb 15 2023, 8:56 AM.

Details

Diff Detail

Event Timeline

ThomasRaoux created this revision.Feb 15 2023, 8:56 AM
Herald added a project: Restricted Project. · View Herald Transcript
ThomasRaoux requested review of this revision.Feb 15 2023, 8:56 AM
nicolasvasilache accepted this revision.Feb 15 2023, 9:01 AM
This revision is now accepted and ready to land.Feb 15 2023, 9:01 AM
qedawkins accepted this revision.Feb 15 2023, 9:06 AM

LGTM

mlir/test/Conversion/VectorToGPU/vector-to-mma-ops.mlir
440

What is this test testing differently from the one immediately above? I only notice the differing shapes.

ThomasRaoux added inline comments.Feb 15 2023, 9:24 AM
mlir/test/Conversion/VectorToGPU/vector-to-mma-ops.mlir
440

Yes, only the shapes are different, that's what exposes the bug since the pattern was mixing source and destination types.

This revision was landed with ongoing or failed builds.Feb 15 2023, 9:34 AM
This revision was automatically updated to reflect the committed changes.

IMO, the accessor name could use some improvements---it's very confusing and error-prone just being getVectorType(); making it something like getSrcVectorType() would make it far easier to avoid pitfalls. At least for me, I need to read the impl to double check what it means by just getVectorType().

IMO, the accessor name could use some improvements---it's very confusing and error-prone just being getVectorType(); making it something like getSrcVectorType() would make it far easier to avoid pitfalls. At least for me, I need to read the impl to double check what it means by just getVectorType().

That's a good point. I agree.

IMO, the accessor name could use some improvements---it's very confusing and error-prone just being getVectorType(); making it something like getSrcVectorType() would make it far easier to avoid pitfalls. At least for me, I need to read the impl to double check what it means by just getVectorType().

+1 getVectorType() isn't by itself informative of its function, although with careful thought I could have avoided introducing this error. Also in this case it seems that none of the conversion tests were testing non-square matrices which was also a point of brittleness.

To close the loop: https://reviews.llvm.org/D144159 landed for improving the accessor methods.