]> git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP/nvptx: support 'arch(nvptx64)' as context selector
authorTobias Burnus <tburnus@baylibre.com>
Wed, 21 Feb 2024 10:31:43 +0000 (11:31 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Wed, 21 Feb 2024 10:31:43 +0000 (11:31 +0100)
commit703d14132e202ed2ab787cfdb37a726fa654455a
treed8712b058290abc7159b03969aa28bcf82090585
parent51c0ff6f503323908d3326050274fc57899300bd
OpenMP/nvptx: support 'arch(nvptx64)' as context selector

The main 'arch' context selector for nvptx is, well, 'nvptx';
however, as 'nvptx64' is used as by LLVM, it makes sense
to support it as well.

Note that LLVM has: "The triple architecture can be one of
``nvptx`` (32-bit PTX) or ``nvptx64`` (64-bit PTX)."
GCC effectively only supports the 64bit variant (at least for
offloading). Thus, GCC's 'nvptx' is not quite the same as LLVM's.

The device-compiler part (nvptx_omp_device_kind_arch_isa) uses
TARGET_ABI64 such that nvptx64 is only defined with -m64.

gcc/ChangeLog:

* config/nvptx/gen-omp-device-properties.sh: Add 'nvptx64' to arch.
* config/nvptx/nvptx.cc (nvptx_omp_device_kind_arch_isa): Likewise.

libgomp/ChangeLog:

* libgomp.texi (OpenMP Context Selectors): Add 'nvptx64' as additional
'arch' value for nvptx.
gcc/config/nvptx/gen-omp-device-properties.sh
gcc/config/nvptx/nvptx.cc
libgomp/libgomp.texi