Skip to content

Commit ee09df8

Browse files
authored
[MLIR][Affine] Switch default option for affine data copy generate pass (llvm#129445)
The more common use of this pass for testing and other purposes is the pointwise copy generation as opposed to DMA generation. Switch the default pass option to pointwise copy generation for easier testing. NFC otherwise. Users who were relying on `generate-dma` to be on by default will have to pass it explicitly: `-affine-data-copy-generate='generate-dma=1'`.
1 parent 829401f commit ee09df8

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def AffineDataCopyGeneration : Pass<"affine-data-copy-generate", "func::FuncOp">
2727
/*default=*/"1",
2828
"Fast memory space identifier for copy generation (default: 1)">,
2929
Option<"generateDma", "generate-dma", "bool",
30-
/*default=*/"true", "Generate DMA instead of point-wise copy">,
30+
/*default=*/"false", "Generate DMA instead of point-wise copy">,
3131
Option<"minDmaTransferSize", "min-dma-transfer", "int",
3232
/*default=*/"1024",
3333
"Minimum DMA transfer size supported by the target in bytes">,

mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ struct AffineDataCopyGeneration
8686

8787
/// Generates copies for memref's living in 'slowMemorySpace' into newly created
8888
/// buffers in 'fastMemorySpace', and replaces memory operations to the former
89-
/// by the latter. Only load op's handled for now.
89+
/// by the latter.
9090
std::unique_ptr<OperationPass<func::FuncOp>>
9191
mlir::affine::createAffineDataCopyGenerationPass(
9292
unsigned slowMemorySpace, unsigned fastMemorySpace, unsigned tagMemorySpace,

mlir/test/Dialect/Affine/affine-data-copy.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: mlir-opt %s -split-input-file -affine-data-copy-generate="generate-dma=false fast-mem-space=0 skip-non-unit-stride-loops" | FileCheck %s
1+
// RUN: mlir-opt %s -split-input-file -affine-data-copy-generate="fast-mem-space=0 skip-non-unit-stride-loops" | FileCheck %s
22
// Small buffer size to trigger fine copies.
3-
// RUN: mlir-opt %s -split-input-file -affine-data-copy-generate="generate-dma=false fast-mem-space=0 fast-mem-capacity=1" | FileCheck --check-prefix=CHECK-SMALL %s
3+
// RUN: mlir-opt %s -split-input-file -affine-data-copy-generate="fast-mem-space=0 fast-mem-capacity=1" | FileCheck --check-prefix=CHECK-SMALL %s
44

55
// Test affine data copy with a memref filter. We use a test pass that invokes
66
// affine data copy utility on the input loop nest.

mlir/test/Dialect/Affine/dma-generate.mlir

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -affine-data-copy-generate="generate-dma fast-mem-space=2 skip-non-unit-stride-loops" -verify-diagnostics | FileCheck %s
2-
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -affine-data-copy-generate="generate-dma fast-mem-capacity=16 fast-mem-space=2" | FileCheck %s --check-prefix FAST-MEM-16KB
1+
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -affine-data-copy-generate="generate-dma=1 fast-mem-space=2 skip-non-unit-stride-loops" -verify-diagnostics | FileCheck %s
2+
// RUN: mlir-opt -allow-unregistered-dialect %s -split-input-file -affine-data-copy-generate="generate-dma=1 fast-mem-capacity=16 fast-mem-space=2" | FileCheck %s --check-prefix FAST-MEM-16KB
33

44
// We run most test cases with -copy-skip-non-unit-stride-loops to allow testing
55
// DMA generation at inner levels easily - since the DMA generation would

0 commit comments

Comments
 (0)