[Openmp-commits] [PATCH] D70971: [libomptarget] Build a minimal deviceRTL for amdgcn

Jon Chesterfield via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Dec 3 11:10:44 PST 2019


JonChesterfield marked 2 inline comments as done.
JonChesterfield added a comment.

Glad it builds. Replies to comments inline



================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt:16-18
+  $ENV{HOME}/rocm/aomp
+  /opt/rocm/aomp
+  /usr/lib/rocm/aomp
----------------
ABataev wrote:
> We can't build the runtime with regular clang?
Sure, it builds fine with trunk. I'm using a local build of clang 9.0 on one machine and the openmp/fortran fork on a second.

The find package seems to be a list of anywhere that clang might plausibly be found. Copied straight out of our fork, happy to remove any entries you don't like the look of.

The NVPTX_CUDA_COMPILER_DIR doesn't seem especially appropriately named. I use the same compiler for nvptx and for amdgcn.


================
Comment at: openmp/libomptarget/deviceRTLs/amdgcn/src/device_environment.h:18-26
+struct omptarget_device_environmentTy {
+  int32_t debug_level;   // gets value of envvar LIBOMPTARGET_DEVICE_RTL_DEBUG
+                         // only useful for Debug build of deviceRTLs 
+  int32_t num_devices;   // gets number of active offload devices 
+  int32_t device_num;    // gets a value 0 to num_devices-1
+};
+
----------------
ABataev wrote:
> Agan this thing. Can we make it common if it is really required? Again, why do we need these new fields? Could you remove it from the current patch?
It's different on nvptx and amdgcn, so not a great candidate for common. The extra fields are used to implement a couple of functions that are stubs in trunk which you weren't sure are necessary for nvptx.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70971





More information about the Openmp-commits mailing list