[all-commits] [llvm/llvm-project] ffabe9: [openmp][amdgpu] Implement target_alloc_host as fi...

Jon Chesterfield via All-commits all-commits at lists.llvm.org
Thu Aug 25 08:28:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ffabe997a5595ae96c635696195c1341935fa7d4
      https://github.com/llvm/llvm-project/commit/ffabe997a5595ae96c635696195c1341935fa7d4
  Author: Jon Chesterfield <jonathanchesterfield at gmail.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
    M openmp/libomptarget/test/api/omp_host_pinned_memory.c
    M openmp/libomptarget/test/api/omp_host_pinned_memory_alloc.c

  Log Message:
  -----------
  [openmp][amdgpu] Implement target_alloc_host as fine grain HSA memory

The cuda plugin maps TARGET_ALLOC_HOST onto cuMemAllocHost
which is page locked host memory. Fine grain HSA memory is not
necessarily page locked but has the same read/write from host or
device semantics.

The cuda plugin does this per-gpu and this patch makes it accessible
from any gpu, but it can be locked down to match the cuda behaviour
if preferred.

Enabling tests requires an equivalent to
// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
for amdgpu which doesn't seem to be in use yet.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D132660




More information about the All-commits mailing list