[OpenMP][libomptarget] Fix deinit of NextGen AMDGPU plugin
authorKevin Sala <kevin.sala@bsc.es>
Thu, 19 Jan 2023 18:47:57 +0000 (19:47 +0100)
committerKevin Sala <kevin.sala@bsc.es>
Fri, 20 Jan 2023 12:17:32 +0000 (13:17 +0100)
commit097f42602d83926a9d5e7fbe3d0bb8ef5c733183
treed7794a6f029a5555a21e1e01dea631e6f260a95b
parentd148f8d7dd4aea1270a329c79313feadf9bbb414
[OpenMP][libomptarget] Fix deinit of NextGen AMDGPU plugin

This patch fixes a segfault that was appearing when the plugin fails to
initialize and then is deinitialized. Also, do not call hsa_shut_down if
the hsa_init failed.

Differential Revision: https://reviews.llvm.org/D142145
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp