[gcc/devel/omp/gcc-16] libgomp.texi: Mention ROCR_VISIBLE_DEVICES in context of USM

Sandra Loosemore via Gcc-cvs <[email protected]>
Newsgroups gmane.comp.gcc.cvs
Message-ID <[email protected]>
https://gcc.gnu.org/g:b2375795197480ba1c28fbcf8f827442061b83ed

commit b2375795197480ba1c28fbcf8f827442061b83ed
Author: Tobias Burnus <[email protected]>
Date:   Tue Jun 9 08:21:18 2026 +0200

    libgomp.texi: Mention ROCR_VISIBLE_DEVICES in context of USM
    
    Re-add half-sentence that got lost in commit r16-5799-gfe5c59ea997316.
    
    Currently, USM is only supported if all AMD GPUs support USM; hence,
    on a mixed system (e.g. CPU with GPU of type APU plus separate, discrete
    GPU not supporting USM/SVM), host fallback always happens.
    
    Workaround is to use ROCR_VISIBLE_DEVICES. Additionally, the
    "not-supported" wording should refer here to USM/SVM support not
    to XNACK, which has been clarified here.
    
    libgomp/ChangeLog:
    
            * libgomp.texi (GCN): Mention ROCR_VISIBLE_DEVICES.
    
    (cherry picked from commit b6f7035408cc08acef6f05a65d5da1d5f9e29a33)

Diff:
---
 libgomp/libgomp.texi | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi
index 869ced1afb3a..05de63e4020c 100644
--- a/libgomp/libgomp.texi
+++ b/libgomp/libgomp.texi
@@ -7667,8 +7667,10 @@ The implementation remark:
       true, in which case the runtime will attempt to set the @code{HSA_XNACK}
       environment variable to @samp{1} automatically (user-set values are not
       overridden, and the setting only affects the executable itself and any
-      child processes).  If any AMD GPU device is not supported, all AMD GPUs
-      are removed from the list of available devices (``host fallback'').
+      child processes).  If any AMD GPU device does not support unified-shared
+      memory, all AMD GPUs are removed from the list of available devices
+      (``host fallback''); consider using @code{ROCR_VISIBLE_DEVICES} to only
+      enable devices supporting it.
 @item The available stack size can be changed using the @code{GCN_STACK_SIZE}
       environment variable; the default is 32 kiB per thread.
 @item Low-latency memory (@code{omp_low_lat_mem_space}) is supported when the
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.