This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Update ReshapeOp::build to be more idiomatic
ClosedPublic

Authored by nicolasvasilache on Jan 12 2020, 7:41 PM.

Details

Summary

This diff makes it easier to create a linalg.reshape op
and adds an EDSC builder api test to exercise the new builders.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2020, 7:41 PM

Unit tests: pass. 61744 tests passed, 0 failed and 780 were skipped.

clang-tidy: fail. Please fix clang-tidy findings.

clang-format: pass.

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

ftynse requested changes to this revision.Jan 12 2020, 11:49 PM

The part that drops symbols needs documentation, including on the ::build to say that symbols will be dropped, and tests. I'm not confident that creating an AffineMap with 0 symbols from a list of expressions that might use symbols is correct.

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
469

Could this just return pos?

This revision now requires changes to proceed.Jan 12 2020, 11:49 PM
nicolasvasilache marked an inline comment as done.Jan 13 2020, 6:52 AM

You're right, thanks made that symbol part more generic and fixed the issue.

Address review comments.

Unit tests: unknown.

clang-tidy: unknown.

clang-format: pass.

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

ftynse accepted this revision.Jan 13 2020, 7:15 AM
ftynse added inline comments.
mlir/test/EDSC/builder-api-test.cpp
986

Can we have an AffineExpr with symbols here? Just to check that symbol removal machinery works.

This revision is now accepted and ready to land.Jan 13 2020, 7:15 AM
nicolasvasilache marked 2 inline comments as done.Jan 13 2020, 7:54 AM
nicolasvasilache added inline comments.
mlir/test/EDSC/builder-api-test.cpp
986

I made it into an assertion, there is no removal but just an assertion that it is symbolless.

nicolasvasilache marked an inline comment as done.

Update.

This revision was automatically updated to reflect the committed changes.

Unit tests: pass. 61783 tests passed, 0 failed and 781 were skipped.

clang-tidy: unknown.

clang-format: pass.

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