[Openmp-commits] [PATCH] D107927: [OpenMP] Use IsHostPtr where needed for targetDataBegin

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Aug 11 13:05:10 PDT 2021

jdenny created this revision.
jdenny added reviewers: grokos, tianshilei1992, RaviNarayanaswamy, jdoerfert.
jdenny added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
jdenny requested review of this revision.
Herald added a subscriber: sstefan1.

As discussed in D105990 <https://reviews.llvm.org/D105990>, without this patch, `targetDataBegin`
determines whether to transfer data (as opposed to assuming it's in
shared memory) using the condition `!UseUSM || HasCloseModifier`.
However, this condition is broken if use of discrete memory was forced
by `omp_target_associate_ptr`.  This patch extends
`unified_shared_memory/associate_ptr.c` to reveal this case, and it
fixes it using `!IsHostPtr` in `DeviceTy::getTargetPointer` to replace
this condition.

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107927.365830.patch
Type: text/x-patch
Size: 5563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210811/05ff62a2/attachment-0001.bin>

More information about the Openmp-commits mailing list