canonizer / libgpuvm

library which simplifies host-GPU data transfer using userspace pagefault handling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

one-sided transfer for arrays

canonizer opened this issue · comments

sometimes, arrays are used for one-sided communication only, e.g. device -> host or host -> device. As they can be still modified on both sides, however, general way of handling them will require copying in both directions. It is possible, though, to add a flag indicating that arrays are copied one side only:

GPUVM_HOST_TO_DEVICE // copied host -> device
GPUVM_DEVICE_TO_HOST // copied device -> host

...
gpuvm_link(harr, sz, idev, darr, GPUVM_ON_HOST | GPUVM_HOST_TO_DEVICE);