[Openmp-commits] [PATCH] D14031: [OpenMP] Initial implementation of OpenMP offloading library - libomptarget.

Samuel Antao via Openmp-commits openmp-commits at lists.llvm.org
Fri Oct 23 17:01:02 PDT 2015


sfantao created this revision.
sfantao added reviewers: hfinkel, jlpeyton, jcownie, ABataev.
sfantao added subscribers: sergos, andreybokhanko, carlo.bertolli, caomhin, hyviquel, Hahnfeld, openmp-commits.

This patches proposes an initial implementation of the libomptarget based on what we have working today in https://github.com/clang-omp. 

I tried to follow what has been done in openmp/runtime in terms of the cmake build system.

The library sources are placed under libomptarget and it consists of three components:
 - device agnostic library (the interface that clang uses)
 - device plugins - right now we create a plug-in for CUDA-enabled devices, and a generic 64-bit plugin that works on powerpcBE/LE and x86_64 (mostly for testing purposes)
 - device runtime library for CUDA enabled devices.

The interface of the plugins and target agnostic library are documented in http://goo.gl/L1rnKJ.

I included the logic for testing based on llvm-lit and FileCheck. Currently there are only two regression tests that basically check that offloading failed. This is because the target side codegen (http://reviews.llvm.org/D12614) and driver support (http://reviews.llvm.org/D9888) are still under review in clang. Once that functionality is in clang I plan to include more tests to exercise the library.

In this patch, I tried to organize things based on what makes sense to me and also based on previous discussions with other OpenMP project contributors. I am happy to organize things in a different way if suggested to do so - the goal here is also open the discussion on how this library should be contributed to the the project.

Let me now any suggestions/comments you may have,

Thanks!
Samuel

http://reviews.llvm.org/D14031

Files:
  CMakeLists.txt
  libomptarget/Build_With_CMake.txt
  libomptarget/CMakeLists.txt
  libomptarget/README.txt
  libomptarget/cmake/Modules/LibomptargetGetDependencies.cmake
  libomptarget/cmake/Modules/LibomptargetUtils.cmake
  libomptarget/cmake/Modules/config-ix.cmake
  libomptarget/deviceRTLs/CMakeLists.txt
  libomptarget/deviceRTLs/nvptx/CMakeLists.txt
  libomptarget/deviceRTLs/nvptx/src/cancel.cu
  libomptarget/deviceRTLs/nvptx/src/counter_group.h
  libomptarget/deviceRTLs/nvptx/src/counter_groupi.h
  libomptarget/deviceRTLs/nvptx/src/critical.cu
  libomptarget/deviceRTLs/nvptx/src/debug.cu
  libomptarget/deviceRTLs/nvptx/src/debug.h
  libomptarget/deviceRTLs/nvptx/src/interface.h
  libomptarget/deviceRTLs/nvptx/src/libcall.cu
  libomptarget/deviceRTLs/nvptx/src/loop.cu
  libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu
  libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.h
  libomptarget/deviceRTLs/nvptx/src/omptarget-nvptxi.h
  libomptarget/deviceRTLs/nvptx/src/option.h
  libomptarget/deviceRTLs/nvptx/src/parallel.cu
  libomptarget/deviceRTLs/nvptx/src/reduction.cu
  libomptarget/deviceRTLs/nvptx/src/stdio.cu
  libomptarget/deviceRTLs/nvptx/src/support.h
  libomptarget/deviceRTLs/nvptx/src/supporti.h
  libomptarget/deviceRTLs/nvptx/src/sync.cu
  libomptarget/deviceRTLs/nvptx/src/task.cu
  libomptarget/exports
  libomptarget/plugins/CMakeLists.txt
  libomptarget/plugins/cuda/CMakeLists.txt
  libomptarget/plugins/cuda/src/rtl.cpp
  libomptarget/plugins/exports
  libomptarget/plugins/generic-64bit/src/rtl.cpp
  libomptarget/plugins/ppc64/CMakeLists.txt
  libomptarget/plugins/ppc64le/CMakeLists.txt
  libomptarget/plugins/x86_64/CMakeLists.txt
  libomptarget/src/omptarget.cpp
  libomptarget/src/omptarget.h
  libomptarget/src/targets_info.cpp
  libomptarget/src/targets_info.h
  libomptarget/test/CMakeLists.txt
  libomptarget/test/lit.cfg
  libomptarget/test/lit.site.cfg.in
  libomptarget/test/offloading/offloading_success.c
  libomptarget/test/offloading/offloading_success.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14031.38275.patch
Type: text/x-patch
Size: 314840 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20151024/d5ea6eb4/attachment-0001.bin>


More information about the Openmp-commits mailing list