[Openmp-commits] [PATCH] D131010: [Libomptarget] Support device destructors more correctly

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 2 12:28:55 PDT 2022


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, tianshilei1992, ronlieb, JonChesterfield.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: OpenMP.
Herald added a subscriber: openmp-commits.

Previous patched addressed problems with the plugin's teardown order by
implementing a specific function used to initialize and uninitialize the
plugins. This allows us to more correctly control the teardown order.
This is important for handling device destructors which were previously
problematic as the runtime may have been unititialized prior to
attempting to run the destructors. This patch adds support for the new
init / deinit plugin functions to the CUDA and generic plugins. We can
now correctly test device destructors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131010

Files:
  openmp/libomptarget/plugins/cuda/src/rtl.cpp
  openmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
  openmp/libomptarget/test/offloading/global_constructor.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131010.449386.patch
Type: text/x-patch
Size: 16506 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220802/7b47bf86/attachment-0001.bin>


More information about the Openmp-commits mailing list