[Openmp-commits] [PATCH] D142145: [OpenMP][libomptarget] Fix deinit of NextGen AMDGPU plugin

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 19 16:06:00 PST 2023


jhuber6 added a comment.

In D142145#4067211 <https://reviews.llvm.org/D142145#4067211>, @kevinsala wrote:

> @jhuber6 I was testing the change but the compilation reports the following warning:
>
>   openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp:2331:22: warning: the address of ‘hsa_status_t hsa_shut_down()’ will never be NULL [-Waddress]
>        if (hsa_shut_down)
>
> When we build with `dynamic_hsa`, `hsa_shut_down` (and the rest) appear as a defined function. Looking at `nm libomptarget.rtl.amdgpu.nextgen.so`, it appears the symbol with symbol type `t`, i.e. text (code) section. So it sounds this will never be null. I guess `hsa_shut_down` is a function defined in `dynamic_hsa/hsa.cpp` acting as a wrapper function.

I see, most likely from how we do the `DLWRAP` stuff I'm guessing. It's not a huge deal either way. Go ahead and land this since it's not trivial to replace like that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142145/new/

https://reviews.llvm.org/D142145



More information about the Openmp-commits mailing list