Hi,
it seems that the one-shot bufferizer does not handle bufferization.to_tensor ops in the IR to be bufferized, e.g., as in the following IR:
module {
func private @some_func_operating_on_memref(memref<2xf32>) -> ()
func @main(%arg0: tensor<2xf32>) -> () {
%m = bufferization.to_memref %arg0 : memref<2xf32>
call @some_func_operating_on_memref(%m) : (memref<2xf32>) -> ()
%t = bufferization.to_tensor %m : memref<2xf32>
// Some more use of %t
return
}
}
Invocation of the one-shot bufferizer with mlir-opt --one-shot-bufferize triggers an assertion:
void mlir::bufferization::BufferizationAliasInfo::bufferizeOutOfPlace(mlir::OpOperand&): Assertion `!inplaceBufferized.contains(&operand) && “OpOperand was already decided to bufferize inplace”’ failed.
Is this on purpose? Or should the presence of bufferize.to_tensor and bufferize.to_memref be allowed?
Thanks,
Andi