[Openmp-commits] [PATCH] D90172: [OpenMP] Add Support for Mapping Names in Libomptarget RTL

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 27 09:28:05 PDT 2020


jhuber6 updated this revision to Diff 301031.
jhuber6 added a comment.

Restructuring code to use type alias wrapper `name_t` to make it more obvious what the data is beyond a `void *`. Restructured Ident.h into a class with a constructor, this will have an extra constructor for the OpenMP Ident_t struct once D87946 <https://reviews.llvm.org/D87946> is merged. Added a routine to print out the declaration site in the table dump using LIBOMPTARGET_INFO. For example, if I seg-fault in an OpenMP region using `env LIBOMPTARGET_INFO=2` I will get this output for a sample program.

  CUDA device 0 info: Device supports up to 65536 CUDA blocks and 1024 threads with a warp size of 32
  Libomptarget device 0 info: Mapping exists (implicit) with HstPtrBegin=0x00007f12ce17a010, TgtPtrBegin=0x00007f12b1000000, Size=0, updated RefCount=2, Name=C
  Libomptarget device 0 info: Mapping exists (implicit) with HstPtrBegin=0x00007f12e0498010, TgtPtrBegin=0x00007f12ae400000, Size=0, updated RefCount=2, Name=A
  Libomptarget device 0 info: Mapping exists (implicit) with HstPtrBegin=0x00007f12cf0bd010, TgtPtrBegin=0x00007f12b0000000, Size=0, updated RefCount=2, Name=B
  CUDA device 0 info: Launching kernel __omp_offloading_fd02_c53ebe3d__Z4gemmIiNSt3__17complexIdEEEvT_S3_S3_T0_PKS4_S3_S3_S6_S3_S3_S4_PS4_S3_S3__l53 with 504 blocks and 128 threads in SPMD mode
  Libomptarget error: Failed to synchronize device.
  Libomptarget error: Call to targetDataEnd failed, abort target.
  Libomptarget error: Failed to process data after launching the kernel.
  Device 0 Host-Device Pointer Mappings:
  Host Ptr           Target Ptr         Size (B) Declaration
  0x00007f12ce17a010 0x00007f12b1000000 16000000 matrixC[0:M * N] at gemm.cpp:76:24
  0x00007f12cf0bd010 0x00007f12b0000000 16000000 matrixB[0:K * N] at gemm.cpp:75:24
  0x00007f12e0498010 0x00007f12ae400000 16000000 matrixA[0:M * K] at gemm.cpp:74:24
  0x00007ffd43f2fb58 0x00007f1271c00200 16       beta at kernel.h:34:19
  0x00007ffd43f2fb68 0x00007f1271c00000 16       alpha at kernel.h:31:19


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90172

Files:
  openmp/libomptarget/include/Ident.h
  openmp/libomptarget/include/omptarget.h
  openmp/libomptarget/src/device.cpp
  openmp/libomptarget/src/device.h
  openmp/libomptarget/src/interface.cpp
  openmp/libomptarget/src/omptarget.cpp
  openmp/libomptarget/src/private.h
  openmp/libomptarget/src/rtl.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90172.301031.patch
Type: text/x-patch
Size: 36534 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201027/f54a1af3/attachment-0001.bin>


More information about the Openmp-commits mailing list