[Openmp-commits] [PATCH] D131011: [Libomptarget] Deinitialize AMDGPU global state more intentionally
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 2 15:14:08 PDT 2022
JonChesterfield added a comment.
Strongly against going with atexit. The lifetime of these things needs to be sanely nested without use after free errors and we're only going to get that with explicit control flow.
I suspect the root cause of at least some problems is we don't bother to call dlclose and we should do so. I think we can guarantee relative lifetime of hsa/cuda vs the plugin. The edge between host executable and libomptarget is more alarming, but I expect the fix to that is to stop using global destructors in libomptarget and emit a call to tear it down from the main executable instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131011/new/
https://reviews.llvm.org/D131011
More information about the Openmp-commits
mailing list