There is application scenario in my side. We want to do memory zero copy to guarantee efficiency. In this case, I/O memory which is allocated in user app should be leveraged directly by target device at runtime.
But target device requires that the I/O memory should be physically contiguous. With ctx=kDLCPU, the allocated memory is not physically contiguous.
So I wonder whether there is a solution for me to achieve memory zero copy for my specific target device?
Options I can think of:
- add support to alloc physically contiguous memory with device ctx=kDLCPU
- define a specific device type from DeviceAPI and do the memory alloc/free management based on what target device request
Please help suggest.