[Openmp-commits] [openmp] [OpenMP] Enable automatic unified shared memory on MI300A. (PR #77512)
via Openmp-commits
openmp-commits at lists.llvm.org
Sat Jan 13 08:07:48 PST 2024
================
@@ -2728,6 +2780,34 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
return Err;
}
+ /// Detect if current architecture is an APU.
+ Error checkIfAPU() {
----------------
carlobertolli wrote:
Host-allocated ppointers are usable on any gpu that supports unified memory, including MI200 and others.
This is not what we are determining here. What we are finding is whether the architecture is an APU, not a discrete GPU with unified memory capability. If this is changed to return true on MI200, it will make automatic zero-copy the default behavior on that gpu if XNACK is enabled. That's not what we want. What we want is to enable automatic zero-copy on APUs by default, but not enable it by default on discrete GPUs.
This logic follows an observation that OpenMP applications on discrete GPUs are *typically* optimized for data movement, and that configuration performs better than driver-level paging.
HIP doesn't have a concept of automatic zero-copy, as far as I know.
https://github.com/llvm/llvm-project/pull/77512
More information about the Openmp-commits
mailing list