This change adds the BufferizableOpInterface implementation for memref.tensor_store. Differential Revision: https://reviews.llvm.org/D144080
12 lines
418 B
MLIR
12 lines
418 B
MLIR
// RUN: mlir-opt -one-shot-bufferize %s | FileCheck %s
|
|
|
|
// CHECK-LABEL: func @tensor_store(
|
|
// CHECK-SAME: %[[t:.*]]: tensor<?xf32>, %[[m:.*]]: memref<?xf32>
|
|
// CHECK: %[[src:.*]] = bufferization.to_memref %[[t]]
|
|
// CHECK: memref.copy %[[src]], %[[m]]
|
|
// CHECK: return
|
|
func.func @tensor_store(%t: tensor<?xf32>, %m: memref<?xf32>) {
|
|
memref.tensor_store %t, %m : memref<?xf32>
|
|
return
|
|
}
|