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. Of
additional note, 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. For 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 for only global static variables
that are specified in an enter clause on a declare target
directive: specifying those variables in a map clause with always
modifier on a target or target data directive. However, both
map clauses without always modifier and using the
target update, target enter data, or target exit data
directives is fully supported. When the unsupported case is
encountered, the program aborts with an error message.
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.