File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
openmp/libomptarget/plugins-nextgen/amdgpu/src Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -3119,6 +3119,15 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
3119
3119
AMDGPUStreamTy *Stream = nullptr ;
3120
3120
void *PinnedPtr = nullptr ;
3121
3121
3122
+ // Prefault GPU page table in XNACK-Enabled case, on APUs,
3123
+ // under the assumption that explicitly allocated memory
3124
+ // will be fully accessed and that on-the-fly individual page faults
3125
+ // perform worse than whole memory faulting.
3126
+ if (OMPX_APUPrefaultMemcopy && Size >= OMPX_APUPrefaultMemcopySize &&
3127
+ IsAPU && IsXnackEnabled)
3128
+ if (auto Err = prepopulatePageTableImpl (const_cast <void *>(HstPtr), Size))
3129
+ return Err;
3130
+
3122
3131
// Use one-step asynchronous operation when host memory is already pinned.
3123
3132
if (void *PinnedPtr =
3124
3133
PinnedAllocs.getDeviceAccessiblePtrFromPinnedBuffer (HstPtr)) {
You can’t perform that action at this time.
0 commit comments