[Openmp-commits] [PATCH] D120089: [OpenMP][WIP] Explicitly deinitialize device resources
Johannes Doerfert via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Feb 18 09:07:22 PST 2022
jdoerfert added a comment.
In D120089#3330880 <https://reviews.llvm.org/D120089#3330880>, @tianshilei1992 wrote:
> I don't think this patch can fix the first issue because we don't know whether the plugin has already been destroyed when objects from `libomptarget` are destroyed. I had experience that calling plugin functions in destructor of one object from `libomptarget` caused crash because plugin has already been released.
OK, that seems to be a separate issue. I think with the `__tgt_rtl_unregister_lib` we might have that one under control.
So this patch does (1) introduce per device "deinit" capabilities (from libomptarget this is unused for now).
And, (2) deinit all devices as part of the user code destructor (via __tgt_rtl_unregister_lib)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120089/new/
https://reviews.llvm.org/D120089
More information about the Openmp-commits
mailing list