[Openmp-commits] [PATCH] D120089: [OpenMP] Explicitly deinitialize device resources

Shilei Tian via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Sun Mar 6 18:37:49 PST 2022


tianshilei1992 added inline comments.


================
Comment at: openmp/libomptarget/plugins/cuda/src/rtl.cpp:566
+    // TODO: Provide an option to do it lazily once we allow pause/restart.
+    InitializedFlags.assign(NumberOfDevices, true);
   }
----------------
jdoerfert wrote:
> tianshilei1992 wrote:
> > Why do we need it?
> Because we need to know the state of a device. Is it initialized or not. This flag tells us.
Here they are assigned all at once, but we only initialize the device on demand.


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