[mlir] Enable MLIRDialectUtilsTests

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.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D114657
This commit is contained in:
Chia-hung Duan 2021-11-27 22:36:42 +00:00
parent 5c64d8ef8c
commit 2afd16fe72
2 changed files with 1 additions and 13 deletions

View File

@ -9,3 +9,4 @@ target_link_libraries(MLIRDialectTests
add_subdirectory(Quant)
add_subdirectory(SparseTensor)
add_subdirectory(SPIRV)
add_subdirectory(Utils)

View File

@ -110,19 +110,6 @@ TEST(isRowMajorMatmul, TooManyMaps) {
EXPECT_THAT(maps, Not(Truly(isRowMajorMatmul)));
}
TEST(isRowMajorMatmul, TooFewDims) {
MLIRContext context;
AffineExpr m, n, k;
bindDims(&context, m, n, k);
auto mapA = AffineMapAttr::get(AffineMap::get(3, 0, {m, k}, &context));
auto mapB = AffineMapAttr::get(AffineMap::get(2, 0, {k, n}, &context));
auto mapC = AffineMapAttr::get(AffineMap::get(3, 0, {m, n}, &context));
auto maps = ArrayAttr::get(&context, {mapA, mapB, mapC});
EXPECT_THAT(maps, Not(Truly(isRowMajorMatmul)));
}
TEST(isRowMajorMatmul, TooFewOutputs) {
MLIRContext context;