As discussed in 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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
openmp/libomptarget/src/device.h | ||
---|---|---|
264–265 | Ah, I overlooked this documentation. I'll update it later. |
Ah, I overlooked this documentation. I'll update it later.