amdgcn: Add gfx90c target
commitb8e9fd535d6093e3a24af858364d8517a767b0d7
authorFrederik Harwath <frederik@harwath.name>
Wed, 24 Apr 2024 18:29:14 +0000 (24 20:29 +0200)
committerFrederik Harwath <frederik@harwath.name>
Fri, 26 Apr 2024 09:23:43 +0000 (26 11:23 +0200)
tree69b319b05e5034461840ac6e9b2b9dad5bf4948c
parent4a2e55b3ada20fe6457466bb687a66c8d03e056e
amdgcn: Add gfx90c target

Add support for gfx90c GCN5 APU integrated graphics devices.
The LLVM AMDGPU documentation does not list those devices as supported
by rocm-amdhsa, but it passes most libgomp offloading tests.
Although they are constrainted compared to dGPUs, they might be
interesting for learning, experimentation, and testing.

gcc/ChangeLog:

* config.gcc: Add gfx90c.
* config/gcn/gcn-hsa.h (NO_SRAM_ECC): Likewise.
* config/gcn/gcn-opts.h (enum processor_type): Likewise.
(TARGET_GFX90c): New macro.
* config/gcn/gcn.cc (gcn_option_override): Handle gfx90c.
(gcn_omp_device_kind_arch_isa): Likewise.
(output_file_start): Likewise.
* config/gcn/gcn.h: Add gfx90c.
* config/gcn/gcn.opt: Likewise.
* config/gcn/mkoffload.cc (EF_AMDGPU_MACH_AMDGCN_GFX90c): New macro.
(get_arch): Handle gfx90c.
(main): Handle EF_AMDGPU_MACH_AMDGCN_GFX90c
* config/gcn/t-omp-device: Add gfx90c.
* doc/install.texi: Likewise.
* doc/invoke.texi: Likewise.

libgomp/ChangeLog:

* plugin/plugin-gcn.c (isa_hsa_name): Handle EF_AMDGPU_MACH_AMDGCN_GFX90c.
(isa_code): Handle gfx90c.
(max_isa_vgprs): Handle EF_AMDGPU_MACH_AMDGCN_GFX90c.

Signed-off-by: Frederik Harwath <frederik@harwath.name>
gcc/config.gcc
gcc/config/gcn/gcn-hsa.h
gcc/config/gcn/gcn-opts.h
gcc/config/gcn/gcn.cc
gcc/config/gcn/gcn.h
gcc/config/gcn/gcn.opt
gcc/config/gcn/mkoffload.cc
gcc/config/gcn/t-omp-device
gcc/doc/install.texi
gcc/doc/invoke.texi
libgomp/plugin/plugin-gcn.c