[oneDNN] Question on adding optional tensors to ops
Created by: jczaja
I'm trying to add 'MidOut' optional output to pool2d operator. oneDNN BWD needs indices from FWD to to perform GRAD operation (similar like your op: max_pool2d_with_indices). This 'MidOut' is needed only for oneDNN data , so I do not want PaddlePaddle users to see that Tensor e.g. ideally not to expose this 'MidOut' in API.
Some changes with Disposable 'MidOut': https://github.com/PaddlePaddle/Paddle/pull/26664 , It does not work with dygraph
Can it be done? If positive tell me how can I create output tensor only for internal usage, that will not be exposed in API ?