Search code examples
memory-managementcudagpgpunvidiavirtual-address-space

Can CPU-process write to memory(UVA) in GPU-RAM allocated by other CPU-process?


When we use nVidia GPU we can use UVA (unified virtual addressing) as on the picture. But we can use GPU+UVA from different CPU-processes with different contexts.

Will be UVA use the same Page-Table (virtual address <-> physical address) for UVA in all CPU-processes(contexts), look like as it done for kernel-space addressing, or for each of CPU-process will be created own Page-Table in their address space of this process (i.e. CPU-process can not write to memory(UVA) in GPU-RAM allocated by other CPU-process)?

enter image description here


Solution

  • Different CPU processes have different process-based virtual to physical pointer mappings. Therefore a (virtual) pointer created in one CPU process cannot be reliably used in another process. UVA has no control over harmonizing separate CPU process virtual mappings.