This is an archive of the discontinued LLVM Phabricator instance.

[mlir] [VectorOps] generalized vector.contract semantics
ClosedPublic

Authored by aartbik on Feb 4 2020, 6:04 PM.

Details

Summary

Previously, vector.contract did not allow an empty set of
free or batch dimensions (K = 0) which defines a basic
reduction into a scalar (like a dot product). This CL
relaxes that restriction. Also adds constraints on
element type of operands and results. With tests.

Diff Detail

Event Timeline

aartbik created this revision.Feb 4 2020, 6:04 PM
aartbik edited the summary of this revision. (Show Details)Feb 4 2020, 6:15 PM

Unit tests: pass. 62465 tests passed, 0 failed and 845 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

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

rriddle added inline comments.Feb 4 2020, 6:32 PM
mlir/include/mlir/Dialect/VectorOps/VectorOps.td
152

nit: Can you format these to one line now?

mlir/lib/Dialect/VectorOps/VectorOps.cpp
206

nit: Can you just inline this function? It only has one use case and isn't very large.

234

Is this supposed to be except for?

aartbik updated this revision to Diff 242510.Feb 4 2020, 9:06 PM
aartbik marked 5 inline comments as done.

address comments

aartbik added inline comments.Feb 4 2020, 9:07 PM
mlir/lib/Dialect/VectorOps/VectorOps.cpp
206

Yes, of course. I had bigger plans for this, but then only used it once :-)

234

No, I meant "accept" as in continue without doing the tests below. But rephrased this into something better.

Unit tests: pass. 62465 tests passed, 0 failed and 845 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

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

andydavis1 accepted this revision.Feb 5 2020, 4:29 PM

Looks good from my perspective.

This revision is now accepted and ready to land.Feb 5 2020, 4:29 PM
aartbik updated this revision to Diff 242787.Feb 5 2020, 4:50 PM

rebased with head

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: console-log.txt

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

Unit tests: unknown.

clang-tidy: pass.

clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.

Build artifacts: clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt

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

This revision was automatically updated to reflect the committed changes.