[Openmp-dev] Malloc in target region

Jon Chesterfield via Openmp-dev openmp-dev at lists.llvm.org
Wed Jun 24 04:40:27 PDT 2020


Hello OpenMP,

Our language spec seems fairly light on what it means to call malloc from a
target region.

I can think of a few interpretations:
- One heap per process. Malloc on target or host, free from either.
Writable from either, or some other device. Might mean intercepting host
libc. Convenient, slow.
- One heap per device + one for host. Each independent, pointers only valid
on the thing that called malloc.
- One heap per target offload region, inaccessible from host.
- Some other granularity.

Generally gets faster as the restrictions increase.

Anyone willing to state / guess what they or their users would expect?
Bearing in mind that new is likely to call malloc and will gain the same
properties.

Thanks,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200624/133c611b/attachment.html>


More information about the Openmp-dev mailing list