Differential D138915 Diff 479618 mlir/test/Dialect/Bufferization/Transforms/tensor-copy-insertion-memory-space.mlir
Changeset View
Changeset View
Standalone View
Standalone View
mlir/test/Dialect/Bufferization/Transforms/tensor-copy-insertion-memory-space.mlir
// RUN: mlir-opt %s -tensor-copy-insertion="must-infer-memory-space" -split-input-file | FileCheck %s | // RUN: mlir-opt %s -test-tensor-copy-insertion="must-infer-memory-space" -split-input-file | FileCheck %s | ||||
// CHECK-LABEL: func @unknown_op_copy | // CHECK-LABEL: func @unknown_op_copy | ||||
func.func @unknown_op_copy() -> (tensor<10xf32>, tensor<10xf32>) { | func.func @unknown_op_copy() -> (tensor<10xf32>, tensor<10xf32>) { | ||||
%c0 = arith.constant 0 : index | %c0 = arith.constant 0 : index | ||||
%cst = arith.constant 0.0 : f32 | %cst = arith.constant 0.0 : f32 | ||||
// CHECK: %[[dummy:.*]] = "test.dummy_op"() : () -> tensor<10xf32> | // CHECK: %[[dummy:.*]] = "test.dummy_op"() : () -> tensor<10xf32> | ||||
%t = "test.dummy_op"() : () -> tensor<10xf32> | %t = "test.dummy_op"() : () -> tensor<10xf32> | ||||
// CHECK: %[[copy:.*]] = bufferization.alloc_tensor() copy(%[[dummy]]) {bufferization.escape = [false]} : tensor<10xf32> | // CHECK: %[[copy:.*]] = bufferization.alloc_tensor() copy(%[[dummy]]) {bufferization.escape = [false]} : tensor<10xf32> | ||||
Show All 16 Lines |