Skip to content
  1. Apr 07, 2022
    • Michael Kruse's avatar
      [libomptarget] Add device RTL to regression test dependencies. · 7fa7b0cb
      Michael Kruse authored
      In a clean build directory, `check-openmp` or `check-libomptarget` will fail because of missing device RTL .bc files. Ensure that the new targets new custom targets `omptarget.devicertl.nvptx` and `omptarget.devicertl.amdgpu` (corresponding to the plugin rtl targets `omptarget.rtl.cuda`, respectively `omptarget.rlt.amdgpu` ) are dependencies of the regression tests.
      
      Reviewed By: JonChesterfield
      
      Differential Revision: https://reviews.llvm.org/D123177
      7fa7b0cb
  2. Apr 06, 2022
  3. Mar 31, 2022
  4. Mar 29, 2022
  5. Mar 26, 2022
    • Shilei Tian's avatar
      [OpenMP][CUDA] Fix potential program crash caused by double free resources · 545fcc3d
      Shilei Tian authored
      As we mentioned in the code comments for function `ResourcePoolTy::release`,
      at some point there could be two identical resources on the two sides of `Next`
      mark. It is usually not an issue, unless the following case:
      1. Some resources are not returned.
      2. We need to iterate the pool and free the element.
      
      That will cause double free, which is the case for event pool. Since we don't release
      events hold by the data map, it can happen that the `Next` mark is not reset, and
      we have two identical items in the pool. When the pool is destroyed, we will call
      `cuEventDestroy` twice on the same event. In the best case, we can only observe
      CUDA errors. In the worst case, it can cause internal failures in CUDART and further
      crash.
      
      This patch fixes the issue by tracking all resources that have been given using
      an `unordered_set`. We don't remove it when a resource is returned. When the pool
      is destroyed, we merge the pool (a `vector`) and the set. In this way, we can make
      sure that the set contains all resources allocated from the device. We just need
      to iterate the set and free the resource accordingly.
      
      For now, only event pool is set to use it. Stream pool is not because we can make
      sure all streams are returned when the plugin is destroyed.
      
      Someone might be wondering, why don't we release all events hold in the data map.
      That is because, plugins are determined to be destroyed *before* `libomptarget`.
      If we can somehow make the plugin outlast `libomptarget`, life will be much
      easier.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D122014
      545fcc3d
    • Joseph Huber's avatar
      [OpenMP] Add AMDGPU calling convention to ctor / dtor functions · 9d3550c5
      Joseph Huber authored
      This patch adds the necessary AMDGPU calling convention to the ctor /
      dtor kernels. These are fundamentally device kenels called by the host
      on image load. Without this calling convention information the AMDGPU
      plugin is unable to identify them.
      
      Depends on D122504
      
      Fixes #54091
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D122515
      9d3550c5
  6. Mar 25, 2022
  7. Mar 22, 2022
    • Joseph Huber's avatar
      [OpenMP] Manually unroll the argument copy loop · a619072c
      Joseph Huber authored
      The unroll pragma did not properly work as the loop bound was not known
      when we optimize the runtime and we then added a "unroll disable"
      metadata which prevented unrolling later when the bounds were known.
      For now we manually unroll to make sure up to 16 elements are handled
      nicely. This helps optimizations to look through the argument passing.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D109164
      a619072c
  8. Mar 17, 2022
  9. Mar 12, 2022
  10. Mar 10, 2022
  11. Mar 09, 2022
  12. Mar 08, 2022
  13. Mar 07, 2022
  14. Mar 06, 2022
  15. Mar 05, 2022
  16. Mar 04, 2022
    • Joseph Huber's avatar
      [Libomptarget] Work around bug in initialization of libomptarget · e2dcc221
      Joseph Huber authored
      Libomptarget uses some shared variables to track certain internal stated
      in the runtime. This causes problems when we have code that contains no
      OpenMP kernels. These variables are normally initialized upon kernel
      entry, but if there are no kernels we will see no initialization.
      Currently we load the runtime into each source file when not running in
      LTO mode, so these variables will be erroneously considered undefined or
      dead and removed, causing miscompiles. This patch temporarily works
      around the most obvious case, but others still exhibit this problem. We
      will need to fix this more soundly later.
      
      Fixes #54208.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D121007
      e2dcc221
  17. Mar 03, 2022
  18. Mar 02, 2022
  19. Mar 01, 2022
Loading