alpaka-group / alpaka

Abstraction Library for Parallel Kernel Acceleration :llama:
https://alpaka.readthedocs.io
Mozilla Public License 2.0
342 stars 71 forks source link

Support for mapped/unified memory #612

Open psychocoderHPC opened 6 years ago

psychocoderHPC commented 6 years ago

It is useful to have in some cases support for mapped/unified memory. This allows the user to allocated host memory and use this memory directly on the GPU without waisting useful GPU memory.

In CUDA there are two kinds of host memory which can be addressed from the GPU without the need of an explicit memcopy.

A open question is if such a feature is also supported by other platforms like AMD gpus or maybe later FPGs.

BenjaminW3 commented 6 years ago

Unified memory already in #296

BenjaminW3 commented 6 years ago

Mapping CPU memory into GPU memory space should aready be supported but is untested: alpaka::mem::buf::map(buffer, targetDevice); The device pointer can than be accessed via auto ptr = alpaka::mem::view::getPtrDev(buffer, targetDevice). I do not know if this works.

psychocoderHPC commented 6 years ago

@BenjaminW3 thx I will have a look into alpaka unified memory.