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

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Aug 25 08:44:04 PDT 2022


JonChesterfield added a comment.

I wondered about the `is_device_ptr(shared_ptr)` clause. The pointer itself should work fine on the GPU as far as I know - there isn't the same host-and-device-pointers-to-same-memory-are-different-values behaviour from CUDA - but for some reason that was failing with

> Memory access fault by GPU node-4 (Agent handle: 0x55a06e168550) on address 0x7fda576b6000. Reason: Page not present or supervisor privilege.

This feels like conflating different things. Whether the memory is paged in/out of the host and gpus on use (which might be called HMM for heterogenous memory management) and whether the function scope symbol `shared_ptr` resolves to the same value on both host and gpu, which I think requires passing it as an implicit argument to the target region and initialising a local i64 with it, or using 'unified shared memory' perhaps.

Regardless, some plumbing is evidently missing at present.


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