Is it possible to do device to device memory mapping? Ie. all access to adress X actualy reads/writes to address Y.
When you say device to device, I assume you mean 2 devices.
Suppose 2 devices, A and B are in a P2P relationship (cudaDeviceEnablePeerAccess)
Suppose X is a pointer to an allocation (cudaMalloc) on device A.
Dereferencing the X pointer on device B will result in peer traffic (between A and B, over the relevant fabric either PCIE or NVLink) to satisfy the read or write request.
If you actually meant a single device for all this, then I don’t understand the question. If you want to read or write X to Y, simply assign the pointer X to be equal to the pointer Y.