[Openmp-commits] [PATCH] D107925: [OpenMP] Use IsHostPtr where needed for targetDataEnd

George Rokos via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Aug 27 15:12:56 PDT 2021


grokos accepted this revision.
grokos added inline comments.
This revision is now accepted and ready to land.


================
Comment at: openmp/libomptarget/src/device.cpp:368
 
-int DeviceTy::deallocTgtPtr(void *HstPtrBegin, int64_t Size,
-                            bool HasCloseModifier) {
-  if (PM->RTLs.RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY &&
-      !HasCloseModifier)
-    return OFFLOAD_SUCCESS;
+int DeviceTy::deallocTgtPtr(void *HstPtrBegin, int64_t Size) {
   // Check if the pointer is contained in any sub-nodes.
----------------
Just to be on the safe side for future patches, can you add a comment saying that `DeviceTy::deallocTgtPtr` no longer checks whether we use USM and it assumes that the caller has checked beforehand that `HstPtrBegin` has (or should have) corresponding storage on the device instead of shared memory?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107925



More information about the Openmp-commits mailing list