GOMP_RUNTIME_USM – Control runtime Unified Shared Memory application ¶Control the behavior of devices which can access host memory, specifically
whether data mapping copies data or uses self-mapping, such that the device
directly accesses the corresponding host memory. Setting the environment
variable to DISABLED does not make use of Unified Shared Memory by
default. Setting it to AUTO conditionally enables Unified Shared
Memory (USM) on specific integrated GPUs (APUs, in the verbiage of AMD). In most
workloads on these types of GPUs, self-mapping is expected to reduce runtime
overhead. Lastly, setting it to ENABLED unconditionally attempts
to make use of Unified Shared Memory if the device claims to support it.
For general caveats around Unified Shared Memory, please consult the relevant
sections in Offload-Target Specifics.
When Unified Shared Memory is enabled by this environment variable, the
following is currently unsupported: using a global static variable,
specified in an enter clause on a declare target, in a
map clause with always modifier on either a target or
a target data directive. When the unsupported case is encountered,
the program aborts with an error message.
When specifying the unified_shared_memory or self_maps clauses
with the requires directive causes that behavior to take precedence
over the behavior set by this environment variable.
OpenACC is unaffected by the value of this environment variable, however, hybrid usage of OpenMP and OpenACC offloading results in the first used framework taking precedent. As an example, if one uses OpenMP offloading and then later OpenACC offloading, the capabilities the device possesses reflect the original OpenMP model.