[Openmp-commits] [PATCH] D132660: [openmp][amdgpu] Implement target_alloc_host as fine grain HSA memory

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 25 07:34:25 PDT 2022


jhuber6 added a comment.

In D132660#3748988 <https://reviews.llvm.org/D132660#3748988>, @JonChesterfield wrote:

> In D132660#3748955 <https://reviews.llvm.org/D132660#3748955>, @jhuber6 wrote:
>
>> Currently,
>>
>> - `llvm_target_alloc`: default allocation strategy, device memory.
>> - `llvm_target_alloc_host`: allocates pinned memory on the host.
>> - `llvm_target_alloc_devce`: allocates device memory.
>> - `llvm_target_alloc_shared`: allocates memory that can be shared between the host and device, .e.g. CUDA managed memory.
>>
>> There are some tests showing existing usage in `test/api`
>
> Do you know what 'migratable memory' might be? Considering treating alloc_host as identical to alloc_shared. Also, D97883 <https://reviews.llvm.org/D97883> is unclear on whether this memory is supposed to be gpu-specific - maybe alloc_host works on any gpu and alloc_shared only works on a specific one, but that's reading a lot into 'host and device(s)' vs 'host and device' in the commit message.

I'm assuming `migratable memory` just refers to the fact that it can be paged out by the OS. I think the allocator just returns pointers, and it's up to the type to determine whether or not the pointer is valid on the host, device, or both.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132660/new/

https://reviews.llvm.org/D132660



More information about the Openmp-commits mailing list