[Mlir-commits] [mlir] [mlir] [linalg] fix side effect of linalg op (PR #114045)
donald chen
llvmlistbot at llvm.org
Tue Oct 29 07:19:38 PDT 2024
================
@@ -0,0 +1,15 @@
+// RUN: mlir-opt %s --canonicalize | FileCheck %s
+
+func.func @map(%arg0: memref<1xf32>, %arg1 : tensor<1xf32>) {
+ %c1 = arith.constant 1 : index
+ %init = arith.constant dense<0.0> : tensor<1xf32>
+ %mapped = linalg.map ins(%arg1:tensor<1xf32>) outs(%init :tensor<1xf32>)
+ (%in : f32) {
+ memref.store %in, %arg0[%c1] : memref<1xf32>
+ linalg.yield %in : f32
+ }
+ func.return
+}
+
+// CHECK-LABEL: @map
+// CHECK: linalg.map
----------------
cxy-1993 wrote:
DONE.
https://github.com/llvm/llvm-project/pull/114045
More information about the Mlir-commits
mailing list