[all-commits] [llvm/llvm-project] 2b7203: [Libomptarget] Deinitialize AMDGPU global state mo...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Aug 2 15:24:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2b7203a35972e98b8521f92d2791043dc539ae88
      https://github.com/llvm/llvm-project/commit/2b7203a35972e98b8521f92d2791043dc539ae88
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2022-08-02 (Tue, 02 Aug 2022)

  Changed paths:
    M openmp/libomptarget/plugins/amdgpu/src/rtl.cpp

  Log Message:
  -----------
  [Libomptarget] Deinitialize AMDGPU global state more intentionally

A previous patch made the destruction of the HSA plugin more
deterministic. However, there were still other global values that are not
handled this way. When attempting to call a destructor kernel, the
device would have already been uninitialized and we could not find the
appropriate kernel to call. This is because they were stored in global
containers that had their destructors called already. Merges this global
state into the rest of the info state by putting those global values
inside of the global pointer already allocated and deallocated by the
constructor and destructor. This should allow the AMDGPU plugin to
correctly identify the destructors if we were to run them.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D131011




More information about the All-commits mailing list