Should I call TF_AllocateOutput or TF_SetOutput and reuse input?

Hi,

Is it valid to reuse the input tensor as the output whenever they are “compatible”?
Let’s say for example I am creating a kernel for Reshape, can I call process the input tensor in place and call TF_SetOutput on it?