diff options
author | Mogball <jeffniu22@gmail.com> | 2021-10-12 23:14:57 +0000 |
---|---|---|
committer | Mogball <jeffniu22@gmail.com> | 2021-10-13 03:07:03 +0000 |
commit | a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa (patch) | |
tree | f4478fb873d88f382b2c3dbdadf254e68faa7244 /mlir/test/Conversion/GPUCommon | |
parent | 666accf283311c5110ae4e2e5e4c4b99078eed15 (diff) | |
download | llvm-a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa.zip llvm-a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa.tar.gz llvm-a54f4eae0e1d0ef5adccdcf9f6c2b518dc1101aa.tar.bz2 |
[MLIR] Replace std ops with arith dialect ops
Precursor: https://reviews.llvm.org/D110200
Removed redundant ops from the standard dialect that were moved to the
`arith` or `math` dialects.
Renamed all instances of operations in the codebase and in tests.
Reviewed By: rriddle, jpienaar
Differential Revision: https://reviews.llvm.org/D110797
Diffstat (limited to 'mlir/test/Conversion/GPUCommon')
-rw-r--r-- | mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir | 6 | ||||
-rw-r--r-- | mlir/test/Conversion/GPUCommon/memory-attrbution.mlir | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir b/mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir index de81424..6eb5aaa 100644 --- a/mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir +++ b/mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir @@ -18,9 +18,9 @@ module attributes {gpu.container_module} { } func @foo(%buffer: memref<?xf32>) { - %c8 = constant 8 : index - %c32 = constant 32 : i32 - %c256 = constant 256 : i32 + %c8 = arith.constant 8 : index + %c32 = arith.constant 32 : i32 + %c256 = arith.constant 256 : i32 gpu.launch_func @kernel_module::@kernel blocks in (%c8, %c8, %c8) threads in (%c8, %c8, %c8) diff --git a/mlir/test/Conversion/GPUCommon/memory-attrbution.mlir b/mlir/test/Conversion/GPUCommon/memory-attrbution.mlir index ff8d16b..194bc91 100644 --- a/mlir/test/Conversion/GPUCommon/memory-attrbution.mlir +++ b/mlir/test/Conversion/GPUCommon/memory-attrbution.mlir @@ -41,7 +41,7 @@ gpu.module @kernel { // ROCDL: llvm.extractvalue %[[descr6:.*]] // ROCDL: llvm.getelementptr // ROCDL: llvm.store - %c0 = constant 0 : index + %c0 = arith.constant 0 : index memref.store %arg0, %arg1[%c0] : memref<4xf32, 5> "terminator"() : () -> () @@ -107,7 +107,7 @@ gpu.module @kernel { // ROCDL: llvm.extractvalue %[[descr6:.*]] // ROCDL: llvm.getelementptr // ROCDL: llvm.store - %c0 = constant 0 : index + %c0 = arith.constant 0 : index memref.store %arg0, %arg1[%c0] : memref<4xf32, 3> "terminator"() : () -> () @@ -177,7 +177,7 @@ gpu.module @kernel { // ROCDL: %[[c1:.*]] = llvm.mlir.constant(1 : index) : i64 // ROCDL: %[[descr10:.*]] = llvm.insertvalue %[[c1]], %[[descr9]][4, 2] - %c0 = constant 0 : index + %c0 = arith.constant 0 : index memref.store %arg0, %arg1[%c0,%c0,%c0] : memref<4x2x6xf32, 3> "terminator"() : () -> () } @@ -221,7 +221,7 @@ gpu.module @kernel { // ROCDL: %[[c4:.*]] = llvm.mlir.constant(4 : i64) // ROCDL: llvm.alloca %[[c4]] x f32 : (i64) -> !llvm.ptr<f32, 5> - %c0 = constant 0 : index + %c0 = arith.constant 0 : index memref.store %arg0, %arg1[%c0] : memref<1xf32, 3> memref.store %arg0, %arg2[%c0] : memref<2xf32, 3> memref.store %arg0, %arg3[%c0] : memref<3xf32, 5> |