Skip to content

Commit 3aef599

Browse files
authored
[MLIR][Affine] NFC. Drop redundant fusion- suffix from fusion pass options (#128405)
NFC. Drop redundant fusion- suffix from fusion pass options. The pass already has 'fusion' in its name. Shorten the option names avoiding repetition.
1 parent 8c917f3 commit 3aef599

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

mlir/include/mlir/Dialect/Affine/Passes.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,16 +154,16 @@ def AffineLoopFusion : Pass<"affine-loop-fusion"> {
154154
}];
155155
let constructor = "mlir::affine::createLoopFusionPass()";
156156
let options = [
157-
Option<"computeToleranceThreshold", "fusion-compute-tolerance", "double",
157+
Option<"computeToleranceThreshold", "compute-tolerance", "double",
158158
/*default=*/"0.30f", "Fractional increase in additional computation "
159159
"tolerated while fusing">,
160-
Option<"fastMemorySpace", "fusion-fast-mem-space", "unsigned",
160+
Option<"fastMemorySpace", "fast-mem-space", "unsigned",
161161
/*default=*/"0",
162162
"Faster memory space number to promote fusion buffers to">,
163-
Option<"localBufSizeThreshold", "fusion-local-buf-threshold", "uint64_t",
163+
Option<"localBufSizeThreshold", "local-buf-threshold", "uint64_t",
164164
/*default=*/"0", "Threshold size (KiB) for promoting local buffers "
165165
"to fast memory space">,
166-
Option<"maximalFusion", "fusion-maximal", "bool", /*default=*/"false",
166+
Option<"maximalFusion", "maximal", "bool", /*default=*/"false",
167167
"Enables maximal loop fusion">,
168168
Option<"affineFusionMode", "mode", "enum FusionMode",
169169
"mlir::affine::FusionMode::Greedy", "fusion mode to attempt",

mlir/test/Dialect/Affine/loop-fusion-2.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion))' -split-input-file | FileCheck %s
2-
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{fusion-maximal}))' -split-input-file | FileCheck %s --check-prefix=MAXIMAL
2+
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{maximal}))' -split-input-file | FileCheck %s --check-prefix=MAXIMAL
33

44
// Part I of fusion tests in mlir/test/Transforms/loop-fusion.mlir.
55
// Part III of fusion tests in mlir/test/Transforms/loop-fusion-3.mlir

mlir/test/Dialect/Affine/loop-fusion-3.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion))' -split-input-file | FileCheck %s
2-
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{fusion-maximal}))' -split-input-file | FileCheck %s --check-prefix=MAXIMAL
2+
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{maximal}))' -split-input-file | FileCheck %s --check-prefix=MAXIMAL
33

44
// Part I of fusion tests in mlir/test/Transforms/loop-fusion.mlir.
55
// Part II of fusion tests in mlir/test/Transforms/loop-fusion-2.mlir

mlir/test/Dialect/Affine/loop-fusion-4.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{mode=producer}))' -split-input-file | FileCheck %s --check-prefix=PRODUCER-CONSUMER
2-
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{mode=producer fusion-maximal}))' -split-input-file | FileCheck %s --check-prefix=PRODUCER-CONSUMER-MAXIMAL
3-
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{fusion-maximal mode=sibling}))' -split-input-file | FileCheck %s --check-prefix=SIBLING-MAXIMAL
2+
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{mode=producer maximal}))' -split-input-file | FileCheck %s --check-prefix=PRODUCER-CONSUMER-MAXIMAL
3+
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion{maximal mode=sibling}))' -split-input-file | FileCheck %s --check-prefix=SIBLING-MAXIMAL
44
// All fusion: producer-consumer and sibling.
55
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(func.func(affine-loop-fusion))' -split-input-file | FileCheck %s --check-prefix=ALL
66
// RUN: mlir-opt -allow-unregistered-dialect %s -pass-pipeline='builtin.module(spirv.func(affine-loop-fusion{mode=producer}))' -split-input-file | FileCheck %s --check-prefix=SPIRV

mlir/test/Dialect/Affine/loop-fusion-inner.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt -pass-pipeline='builtin.module(func.func(affine-loop-fusion{mode=producer fusion-maximal}))' %s | FileCheck %s
1+
// RUN: mlir-opt -pass-pipeline='builtin.module(func.func(affine-loop-fusion{mode=producer maximal}))' %s | FileCheck %s
22

33
// Test fusion of affine nests inside other region-holding ops (scf.for in the
44
// test case below).

mlir/test/Examples/mlir-opt/loop_fusion_options.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: mlir-opt --pass-pipeline="builtin.module(affine-loop-fusion{fusion-compute-tolerance=0})" %s | FileCheck %s
1+
// RUN: mlir-opt --pass-pipeline="builtin.module(affine-loop-fusion{compute-tolerance=0})" %s | FileCheck %s
22

33
// CHECK-LABEL: @producer_consumer_fusion
44
// CHECK-COUNT-3: affine.for

0 commit comments

Comments
 (0)