[Openmp-commits] [PATCH] D137607: Add interop support for OpenMP AMD GPU plugin

Jisheng Zhao via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sat Nov 19 07:04:10 PST 2022


jz10 updated this revision to Diff 476677.
jz10 added a comment.

Thanks Johannes

1. "With the new changes, we return omp_interop_none a lot w/o telling the user what went wrong. Why not create an object and set the error string as we did before?"

The check of deviceIsReady returns omp_interop_val_t object with error message if device was not ready

2. "You also still have two entry points into the plugin, we do not need that. The omp_interop_val_t can be initialized by a single init call into the plugin. This will not only remove all the boilerplate of a new plugin API, but also cut down on the complexity of the initialization code in libomptarget."

A new API "get_interop_val "  creates omp_interop_val_t from plugin directly, so this also simplifies the code in "__tgt_interop_init". The API "get_driver_type" is removed.


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

https://reviews.llvm.org/D137607

Files:
  openmp/libomptarget/include/interop.h
  openmp/libomptarget/include/omptarget.h
  openmp/libomptarget/include/omptargetplugin.h
  openmp/libomptarget/include/rtl.h
  openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
  openmp/libomptarget/plugins/cuda/src/rtl.cpp
  openmp/libomptarget/src/interop.cpp
  openmp/libomptarget/src/rtl.cpp
  openmp/libomptarget/test/api/omp_interop_amdgpu.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137607.476677.patch
Type: text/x-patch
Size: 12961 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221119/9ac63a51/attachment-0001.bin>


More information about the Openmp-commits mailing list