This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Enable MLIRDialectUtilsTests
ClosedPublic

Authored by Chia-hungDuan on Nov 26 2021, 3:20 PM.

Details

Summary

Also remove TooFewDims test which tried to create an invalid AffineMap.
The creation of an invalid AffineMap is rejected by willBeValidAffineMap,
as a result we can deprecate the test.

Diff Detail

Event Timeline

Chia-hungDuan created this revision.Nov 26 2021, 3:20 PM
Chia-hungDuan requested review of this revision.Nov 26 2021, 3:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 26 2021, 3:20 PM
bondhugula requested changes to this revision.Nov 26 2021, 8:24 PM
bondhugula added a reviewer: arnab-oss.
bondhugula added inline comments.
mlir/unittests/Dialect/CMakeLists.txt
10

Please add in sorted order.

mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
119

This is building an incorrect affine map since its expressions involve up to d2 (k is d2 here) while the map is being created with only two input dims. Just change this to ...(3, 0, ...).

This revision now requires changes to proceed.Nov 26 2021, 8:24 PM
Chia-hungDuan marked an inline comment as done.Nov 26 2021, 10:25 PM
Chia-hungDuan added inline comments.
mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
119

If we change it into ...(3, 0, ...)..., then it'll be the same test cases as TEST(isRowMajorMatmul, Simple) above. Any suggestions?

Address review

bondhugula added inline comments.Nov 27 2021, 3:40 AM
mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
119

Oh, then please update the commit summary. It's currently misleading when it states "Also remove a test which has been asserted by willBeValidAffineMap.".

bondhugula accepted this revision.Nov 27 2021, 3:40 AM
This revision is now accepted and ready to land.Nov 27 2021, 3:40 AM
Chia-hungDuan marked an inline comment as done.Nov 27 2021, 1:16 PM

update commit message

Chia-hungDuan edited the summary of this revision. (Show Details)Nov 27 2021, 1:17 PM
This revision was landed with ongoing or failed builds.Nov 27 2021, 2:44 PM
This revision was automatically updated to reflect the committed changes.