[Mlir-commits] [mlir] fd26f84 - [mlir][gpu] Rename two misspelled pattern population functions (#109015)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Sep 17 12:26:18 PDT 2024


Author: Andrea Faulds
Date: 2024-09-17T15:26:14-04:00
New Revision: fd26f8444ab5cc1cce6e2990b8a7952915d7767a

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

LOG: [mlir][gpu] Rename two misspelled pattern population functions (#109015)

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
    mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp
    mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.h b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
index a20bae86ace286..67baa8777a6fcc 100644
--- a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.h
@@ -66,14 +66,14 @@ void populateGpuAllReducePatterns(RewritePatternSet &patterns);
 /// Collect a set of patterns to break down subgroup_reduce ops into smaller
 /// ones supported by the target of `size <= maxShuffleBitwidth`, where `size`
 /// is the subgroup_reduce value bitwidth.
-void populateGpuBreakDownSubgrupReducePatterns(RewritePatternSet &patterns,
-                                               unsigned maxShuffleBitwidth = 32,
-                                               PatternBenefit benefit = 1);
+void populateGpuBreakDownSubgroupReducePatterns(
+    RewritePatternSet &patterns, unsigned maxShuffleBitwidth = 32,
+    PatternBenefit benefit = 1);
 
 /// Collect a set of patterns to lower `gpu.subgroup_reduce` into `gpu.shuffle`
 /// ops over `shuffleBitwidth` scalar types. Assumes that the subgroup has
 /// `subgroupSize` lanes. Uses the butterfly shuffle algorithm.
-void populateGpuLowerSubgroupReduceToShufflePattenrs(
+void populateGpuLowerSubgroupReduceToShufflePatterns(
     RewritePatternSet &patterns, unsigned subgroupSize,
     unsigned shuffleBitwidth = 32, PatternBenefit benefit = 1);
 

diff  --git a/mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp b/mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp
index 2cf5d12588a73c..b166f1cd469a4d 100644
--- a/mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp
@@ -346,7 +346,7 @@ struct VectorSubgroupReduceToShuffles final
 };
 } // namespace
 
-void mlir::populateGpuBreakDownSubgrupReducePatterns(
+void mlir::populateGpuBreakDownSubgroupReducePatterns(
     RewritePatternSet &patterns, unsigned maxShuffleBitwidth,
     PatternBenefit benefit) {
   patterns.add<BreakDownSubgroupReduce>(patterns.getContext(),
@@ -354,7 +354,7 @@ void mlir::populateGpuBreakDownSubgrupReducePatterns(
   patterns.add<ScalarizeSingleElementReduce>(patterns.getContext(), benefit);
 }
 
-void mlir::populateGpuLowerSubgroupReduceToShufflePattenrs(
+void mlir::populateGpuLowerSubgroupReduceToShufflePatterns(
     RewritePatternSet &patterns, unsigned subgroupSize,
     unsigned shuffleBitwidth, PatternBenefit benefit) {
   patterns.add<ScalarSubgroupReduceToShuffles, VectorSubgroupReduceToShuffles>(

diff  --git a/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp b/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
index 8c13c0e2575c9c..99a914506b011a 100644
--- a/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
+++ b/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
@@ -75,11 +75,11 @@ struct TestGpuSubgroupReduceLoweringPass
 
     // Since both pattern sets match on the same ops, set higher benefit to
     // perform fewer failing matches.
-    populateGpuBreakDownSubgrupReducePatterns(patterns,
-                                              /*maxShuffleBitwidth=*/32,
-                                              PatternBenefit(2));
+    populateGpuBreakDownSubgroupReducePatterns(patterns,
+                                               /*maxShuffleBitwidth=*/32,
+                                               PatternBenefit(2));
     if (expandToShuffles)
-      populateGpuLowerSubgroupReduceToShufflePattenrs(
+      populateGpuLowerSubgroupReduceToShufflePatterns(
           patterns, /*subgroupSize=*/32, /*shuffleBitwidth=*/32);
 
     (void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));


        


More information about the Mlir-commits mailing list