[Mlir-commits] [mlir] 2afd16f - [mlir] Enable MLIRDialectUtilsTests

Chia-hung Duan llvmlistbot at llvm.org
Sat Nov 27 14:44:13 PST 2021


Author: Chia-hung Duan
Date: 2021-11-27T22:36:43Z
New Revision: 2afd16fe725ffa98723abda6dc19ee6d70f60a4d

URL: https://github.com/llvm/llvm-project/commit/2afd16fe725ffa98723abda6dc19ee6d70f60a4d
DIFF: https://github.com/llvm/llvm-project/commit/2afd16fe725ffa98723abda6dc19ee6d70f60a4d.diff

LOG: [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

Added: 
    

Modified: 
    mlir/unittests/Dialect/CMakeLists.txt
    mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Dialect/CMakeLists.txt b/mlir/unittests/Dialect/CMakeLists.txt
index 6b441567b5489..f37f578572b8f 100644
--- a/mlir/unittests/Dialect/CMakeLists.txt
+++ b/mlir/unittests/Dialect/CMakeLists.txt
@@ -9,3 +9,4 @@ target_link_libraries(MLIRDialectTests
 add_subdirectory(Quant)
 add_subdirectory(SparseTensor)
 add_subdirectory(SPIRV)
+add_subdirectory(Utils)

diff  --git a/mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp b/mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
index bb95402b1ea55..583dbd463b911 100644
--- a/mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
+++ b/mlir/unittests/Dialect/Utils/StructuredOpsUtilsTest.cpp
@@ -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;
 


        


More information about the Mlir-commits mailing list