The op no longer has a copy operand. It now has a region instead. Furthermore, dynamic dims can no longer be omitted when copying a tensor.
%0 = bufferization.alloc_tensor(%sz) init { ^bb0(%arg0: tensor<?xf32>): bufferization.yield %tensor_to_copy : tensor<?xf32> } : tensor<?xf32>
This op can be used to force an allocation for arbitrary tensor values. The region makes it compatible with DPS ops.
In case the op should just allocate and not copy, the block argument can be yielded directly.
%0 = bufferization.alloc_tensor(%sz) init { ^bb0(%arg0: tensor<?xf32>): bufferization.yield %arg0 : tensor<?xf32> } : tensor<?xf32>
This op is heavily utilized during bufferization and we rely on readable IR dumps for debugging bufferization issues. Therefore, the parser/printer support a shorter syntax in case the region consists only of the terminator.
%0 = bufferization.alloc_tensor(%sz) copy(%tensor_to_copy) : tensor<?xf32>
This syntax is identical to the previous syntax (before adding the region).
Depends On: D144389