This is an archive of the discontinued LLVM Phabricator instance.

[mlir] [VectorOps] Implement vector tuple get folding
ClosedPublic

Authored by aartbik on Jan 22 2020, 10:07 AM.

Details

Diff Detail

Event Timeline

aartbik created this revision.Jan 22 2020, 10:07 AM

Unit tests: fail. 62015 tests passed, 2 failed and 783 were skipped.

failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_recursive/lock.pass.cpp
failed: libc++.std/thread/thread_mutex/thread_mutex_requirements/thread_mutex_requirements_mutex/thread_mutex_recursive/try_lock.pass.cpp

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Unit tests: pass. 62017 tests passed, 0 failed and 783 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Looks good. Thanks Aart!

mlir/lib/Dialect/VectorOps/VectorOps.cpp
1696

I see. So the idea is to rewrite users one at a time, and eventually the tuple op will have no more users and get canonicalized away?

mlir/test/Dialect/VectorOps/vector-transforms.mlir
306

Is it worth adding a test which folds away all of the tuple op users, and test that the tuple op gets canonicalized away?

andydavis1 accepted this revision.Jan 22 2020, 11:31 AM
This revision is now accepted and ready to land.Jan 22 2020, 11:31 AM
aartbik marked 2 inline comments as done.Jan 22 2020, 11:38 AM
aartbik added inline comments.
mlir/lib/Dialect/VectorOps/VectorOps.cpp
1696

Correct! A subsequent CL will refactor the vector-slices transformations as a standalone pass, so we can test the intermediate steps better!

mlir/test/Dialect/VectorOps/vector-transforms.mlir
306

I have a couple more CLs coming up with this.

rriddle requested changes to this revision.Jan 22 2020, 11:39 AM
rriddle added inline comments.
mlir/lib/Dialect/VectorOps/VectorOps.cpp
1686

Like I said before this should be a fold.

This revision now requires changes to proceed.Jan 22 2020, 11:39 AM
aartbik marked an inline comment as done.Jan 22 2020, 11:40 AM
aartbik added inline comments.
mlir/lib/Dialect/VectorOps/VectorOps.cpp
1686

I had added a question in the prior CL. The tuple is not a constant, and I was following the pattern that was there wrt using a canonicalization.

aartbik updated this revision to Diff 239669.Jan 22 2020, 12:14 PM
aartbik marked 2 inline comments as done.

folder

mlir/lib/Dialect/VectorOps/VectorOps.cpp
1686

One folder coming up for Monsieur!

Unit tests: pass. 62017 tests passed, 0 failed and 783 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Is this good to go? I have two follow up CLs in the pipeline!

nicolasvasilache added inline comments.
mlir/lib/Dialect/VectorOps/VectorOps.cpp
1691

drop trivial braces plz

aartbik updated this revision to Diff 239962.Jan 23 2020, 11:46 AM
aartbik marked an inline comment as done.

drop the braces, it is cleaner

Unit tests: fail. 62132 tests passed, 5 failed and 807 were skipped.

failed: libc++.std/language_support/cmp/cmp_partialord/partialord.pass.cpp
failed: libc++.std/language_support/cmp/cmp_strongeq/cmp.strongeq.pass.cpp
failed: libc++.std/language_support/cmp/cmp_strongord/strongord.pass.cpp
failed: libc++.std/language_support/cmp/cmp_weakeq/cmp.weakeq.pass.cpp
failed: libc++.std/language_support/cmp/cmp_weakord/weakord.pass.cpp

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

rriddle accepted this revision.Jan 23 2020, 2:06 PM
This revision is now accepted and ready to land.Jan 23 2020, 2:06 PM
This revision was automatically updated to reflect the committed changes.