Skip to content

[mlir][memref] Rename MemRef directories and files. NFC. #102337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

angelz913
Copy link
Contributor

This PR renames the MemRef integration test directory for and the DecomposeMemref.s.cpp so that they can be found when doing a case-sensitive search on file paths.

@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2024

@llvm/pr-subscribers-mlir-memref
@llvm/pr-subscribers-mlir-gpu

@llvm/pr-subscribers-mlir

Author: Angel Zhang (angelz913)

Changes

This PR renames the MemRef integration test directory for and the DecomposeMemref.s.cpp so that they can be found when doing a case-sensitive search on file paths.


Full diff: https://github.com/llvm/llvm-project/pull/102337.diff

9 Files Affected:

  • (modified) mlir/lib/Dialect/GPU/CMakeLists.txt (+1-1)
  • (renamed) mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp (+1-1)
  • (renamed) mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/memref_abi.c ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/print-memref.mlir ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/reinterpret-cast-runtime-verification.mlir ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir ()
  • (renamed) mlir/test/Integration/Dialect/MemRef/verify-memref.mlir ()
diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt
index 8e4cef5af7e374..a59645480aba21 100644
--- a/mlir/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -28,7 +28,7 @@ add_mlir_dialect_library(MLIRGPUTransforms
   Transforms/AllReduceLowering.cpp
   Transforms/AsyncRegionRewriter.cpp
   Transforms/BufferDeallocationOpInterfaceImpl.cpp
-  Transforms/DecomposeMemrefs.cpp
+  Transforms/DecomposeMemRefs.cpp
   Transforms/EliminateBarriers.cpp
   Transforms/GlobalIdRewriter.cpp
   Transforms/KernelOutlining.cpp
diff --git a/mlir/lib/Dialect/GPU/Transforms/DecomposeMemrefs.cpp b/mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
similarity index 99%
rename from mlir/lib/Dialect/GPU/Transforms/DecomposeMemrefs.cpp
rename to mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
index 1e4c1fbc58948d..2b2d10a7733ece 100644
--- a/mlir/lib/Dialect/GPU/Transforms/DecomposeMemrefs.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp
@@ -1,4 +1,4 @@
-//===- DecomposeMemrefs.cpp - Decompose memrefs pass implementation -------===//
+//===- DecomposeMemRefs.cpp - Decompose memrefs pass implementation -------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
rename to mlir/test/Integration/Dialect/MemRef/cast-runtime-verification.mlir
diff --git a/mlir/test/Integration/Dialect/Memref/load-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/load-runtime-verification.mlir
rename to mlir/test/Integration/Dialect/MemRef/load-runtime-verification.mlir
diff --git a/mlir/test/Integration/Dialect/Memref/memref_abi.c b/mlir/test/Integration/Dialect/MemRef/memref_abi.c
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/memref_abi.c
rename to mlir/test/Integration/Dialect/MemRef/memref_abi.c
diff --git a/mlir/test/Integration/Dialect/Memref/print-memref.mlir b/mlir/test/Integration/Dialect/MemRef/print-memref.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/print-memref.mlir
rename to mlir/test/Integration/Dialect/MemRef/print-memref.mlir
diff --git a/mlir/test/Integration/Dialect/Memref/reinterpret-cast-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/reinterpret-cast-runtime-verification.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/reinterpret-cast-runtime-verification.mlir
rename to mlir/test/Integration/Dialect/MemRef/reinterpret-cast-runtime-verification.mlir
diff --git a/mlir/test/Integration/Dialect/Memref/subview-runtime-verification.mlir b/mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/subview-runtime-verification.mlir
rename to mlir/test/Integration/Dialect/MemRef/subview-runtime-verification.mlir
diff --git a/mlir/test/Integration/Dialect/Memref/verify-memref.mlir b/mlir/test/Integration/Dialect/MemRef/verify-memref.mlir
similarity index 100%
rename from mlir/test/Integration/Dialect/Memref/verify-memref.mlir
rename to mlir/test/Integration/Dialect/MemRef/verify-memref.mlir

@angelz913 angelz913 changed the title [mlir][memref] Rename MemRef directories and files [mlir][memref] Rename MemRef directories and files. NFC. Aug 7, 2024
Copy link

github-actions bot commented Aug 7, 2024

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff f9f0ae1bc47fbe76141cce63a6e92e3f3546ec9b a9acdcfb61d83eb22dee2d8370c57a6855704c17 --extensions c,cpp -- mlir/lib/Dialect/GPU/Transforms/DecomposeMemRefs.cpp mlir/test/Integration/Dialect/MemRef/memref_abi.c
View the diff from clang-format here.
diff --git a/mlir/test/Integration/Dialect/MemRef/memref_abi.c b/mlir/test/Integration/Dialect/MemRef/memref_abi.c
index 8862727a53..08a6e9a4ce 100644
--- a/mlir/test/Integration/Dialect/MemRef/memref_abi.c
+++ b/mlir/test/Integration/Dialect/MemRef/memref_abi.c
@@ -19,18 +19,13 @@
 /* MLIR_BEGIN
 //--- input.mlir
 // Performs: arg0[i, j] = arg0[i, j] + arg1[i, j]
-func.func private @add_memref(%arg0: memref<?x?xf64>, %arg1: memref<?x?xf64>) -> i64
-   attributes {llvm.emit_c_interface} {
-  %c0 = arith.constant 0 : index
-  %c1 = arith.constant 1 : index
-  %dimI = memref.dim %arg0, %c0 : memref<?x?xf64>
-  %dimJ = memref.dim %arg0, %c1 : memref<?x?xf64>
-  affine.for %i = 0 to %dimI {
-    affine.for %j = 0 to %dimJ {
-      %load0 = memref.load %arg0[%i, %j] : memref<?x?xf64>
-      %load1 = memref.load %arg1[%i, %j] : memref<?x?xf64>
-      %add = arith.addf %load0, %load1 : f64
-      affine.store %add, %arg0[%i, %j] : memref<?x?xf64>
+func.func private @add_memref(%arg0: memref<?x?xf64>, %arg1: memref<?x?xf64>) ->
+i64 attributes {llvm.emit_c_interface} { %c0 = arith.constant 0 : index %c1 =
+arith.constant 1 : index %dimI = memref.dim %arg0, %c0 : memref<?x?xf64> %dimJ =
+memref.dim %arg0, %c1 : memref<?x?xf64> affine.for %i = 0 to %dimI { affine.for
+%j = 0 to %dimJ { %load0 = memref.load %arg0[%i, %j] : memref<?x?xf64> %load1 =
+memref.load %arg1[%i, %j] : memref<?x?xf64> %add = arith.addf %load0, %load1 :
+f64 affine.store %add, %arg0[%i, %j] : memref<?x?xf64>
     }
   }
   %c42 = arith.constant 42 : i64

@kuhar
Copy link
Member

kuhar commented Aug 7, 2024

The clang format failure seems unrelated to this PR

@kuhar kuhar merged commit 863a2ed into llvm:main Aug 7, 2024
10 of 11 checks passed
@angelz913 angelz913 deleted the memref-name-fix branch August 8, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants