]> git.ipfire.org Git - thirdparty/gcc.git/commit
gcn: Add missing GFX9_4_GENERIC, OpenMP context-selector update
authorTobias Burnus <tburnus@baylibre.com>
Wed, 15 Oct 2025 17:15:15 +0000 (19:15 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 15 Oct 2025 17:15:15 +0000 (19:15 +0200)
commitb3c0e9aadbee55636f76057b4eecb01807156fae
tree343898d244a051a4c5898892b98f1533b8251ae1
parent0a999da1c8842fd94706c13ced15a5205f497ecf
gcn: Add missing GFX9_4_GENERIC, OpenMP context-selector update

The definition for gfx942 and gfx950 missed the GFX9_4_GENERIC
family flag.

For OpenMP context selectors: The t-omp-device file missed the
generic selectors.

Additionally, there is now a note in the OpenMP documentation that
there is a one-to-one match for ISA names, ignoring any compatibility.
For instance, for Nvidia GPUs 'isa("sm_70")' is only true when compiling
for 'sm_70', even though sm < 7.0 code also runs on sm_70 hardware.
And, for AMD GPUs, gfx9-4-generic neither matches 'gfx942'
(even though such generic code runs on gfx942) - nor the reverse
(although all gfx9-4-generic code runs on gfx942).

gcc/ChangeLog:

* config/gcn/gcn-devices.def (gfx942, gfx950): Set generic name
to GFX9_4_GENERIC.
* config/gcn/t-omp-device: Include generic names for OpenMP's
ISA trait.

libgomp/ChangeLog:

* libgomp.texi (OpenMP Context Selectors): Add note that there is
currently an exact match between ISA and compilation, ignoring
compatibilities in both ways.
* testsuite/libgomp.c/declare-variant-4.h: Add missing variant
functions for specific and generic AMD GPUs.
* testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx11-generic.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx9-generic.c: New test.
gcc/config/gcn/gcn-devices.def
gcc/config/gcn/t-omp-device
libgomp/libgomp.texi
libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4.h