[C++]Can we use shared input/output buffer instead of allocating buffer everytime by tvm

When use tvm, we need allocate input and output buffer by TVMArrayAlloc, however, we already have image memory.Can we just provide the pointer of the memory to tvm and package it into DLTensor, then we can use shared memory for input and ouput Tensor.

I ran into the same problem,when input and out put share same device pointer,this can improves performance,Especially when the amount of data is large. I have try to modify the source code,I have made the input and output device pointer same, but the result is not copy from device memory, it is the zero initalized memory.

Hi Tanglaoda(唐老大?), may I ask where is the code that corresponds to the input buffer and weight buffer sections?