Assume you have the following code. Is it possible to bufferize it and then synthesize deallocation? Am I correct in saying that scf.while is not yet covered by --scf-bufferize? I have verified, and if I put scf.for instead of the scf.while, it works. Funny enough, scf.if is not handled, either.
scf.while (%x0=%c0):(tensor<256xi16>)->(tensor<256xi16>) {
%cond = constant 1: i1
scf.condition(%cond) %x0:tensor<256xi16>
} do {
^bb0(%x0:tensor<256xi16>):
... // some tensor operations that require deallocation
scf.yield %x0:tensor<256xi16>
}
I have a piece of code with an scf.if embedded inside an scf.for, and the whole pipeline of bufferization breaks on the synthesis of the deallocation (I encode output arguments as input memrefs).