Skip to content

[mlir][gpu] Rename two misspelled pattern population functions - #109015

Merged
kuhar merged 1 commit into
llvm:mainfrom
andfau-amd:18142-fix-pattern-spelling-errors
Sep 17, 2024
Merged

kuhar merged 1 commit into
llvm:mainfrom
andfau-amd:18142-fix-pattern-spelling-errors

Conversation

@andfau-amd

Copy link
Copy Markdown
Contributor

No description provided.

@llvmbot

llvmbot commented Sep 17, 2024 •

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-gpu

Author: Andrea Faulds (andfau-amd)

Changes

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

3 Files Affected:

  • (modified) mlir/include/mlir/Dialect/GPU/Transforms/Passes.h (+4-4)
  • (modified) mlir/lib/Dialect/GPU/Transforms/SubgroupReduceLowering.cpp (+2-2)
  • (modified) mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp (+4-4)
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));

@kuhar
kuhar merged commit fd26f84 into llvm:main Sep 17, 2024
hamphet pushed a commit to hamphet/llvm-project that referenced this pull request Sep 18, 2024
andfau-amd added a commit to andfau-amd/llvm-project that referenced this pull request Sep 18, 2024
tmsri pushed a commit to tmsri/llvm-project that referenced this pull request Sep 19, 2024
paleauraaaa pushed a commit to paleauraaaa/llvm-project that referenced this pull request Oct 7, 2026
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