Skip to content

Commit 20b495d

Browse files
[fixip] Move a test and spell out some auto types
1 parent 1179bf2 commit 20b495d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

mlir/unittests/Dialect/MemRef/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
add_mlir_unittest(MLIRMemRefTests
22
InferShapeTest.cpp
3-
LayoutTest.cpp
43
)
54
mlir_target_link_libraries(MLIRMemRefTests
65
PRIVATE

mlir/unittests/IR/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ add_mlir_unittest(MLIRIRTests
1010
IRMapping.cpp
1111
InterfaceAttachmentTest.cpp
1212
LocationTest.cpp
13+
MemrefLayoutTest.cpp
1314
OperationSupportTest.cpp
1415
PatternMatchTest.cpp
1516
ShapedTypeTest.cpp

mlir/unittests/Dialect/MemRef/LayoutTest.cpp renamed to mlir/unittests/IR/MemrefLayoutTest.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- LayoutTest.cpp - unit tests related to memref layout --------------===//
1+
//===- LayoutTest.cpp - unit tests related to memref layout ---------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -19,8 +19,8 @@ TEST(MemRefLayout, maxContigDim) {
1919
MLIRContext ctx;
2020
OpBuilder b(&ctx);
2121

22-
const auto _ = ShapedType::kDynamic;
23-
const auto f32 = b.getF32Type();
22+
const int64_t _ = ShapedType::kDynamic;
23+
const FloatType f32 = b.getF32Type();
2424
auto strided = [&ctx](ArrayRef<int64_t> s) {
2525
return StridedLayoutAttr::get(&ctx, 0, s);
2626
};
@@ -102,8 +102,8 @@ TEST(MemRefLayout, contigTrailingDim) {
102102
MLIRContext ctx;
103103
OpBuilder b(&ctx);
104104

105-
const auto _ = ShapedType::kDynamic;
106-
const auto f32 = b.getF32Type();
105+
const int64_t _ = ShapedType::kDynamic;
106+
const FloatType f32 = b.getF32Type();
107107
auto strided = [&ctx](ArrayRef<int64_t> s) {
108108
return StridedLayoutAttr::get(&ctx, 0, s);
109109
};
@@ -191,8 +191,8 @@ TEST(MemRefLayout, identityMaps) {
191191
MLIRContext ctx;
192192
OpBuilder b(&ctx);
193193

194-
const auto _ = ShapedType::kDynamic;
195-
const auto f32 = b.getF32Type();
194+
const int64_t _ = ShapedType::kDynamic;
195+
const FloatType f32 = b.getF32Type();
196196

197197
// memref<2x2x2xf32>
198198
auto m1 = MemRefType::get({2, 2, 2}, f32);

0 commit comments

Comments
 (0)