aboutsummaryrefslogtreecommitdiff
path: root/libgomp/plugin
diff options
context:
space:
mode:
authorFrederik Harwath <frederik@harwath.name>2024-04-24 20:29:14 +0200
committerFrederik Harwath <frederik@harwath.name>2024-04-26 11:23:43 +0200
commitb8e9fd535d6093e3a24af858364d8517a767b0d7 (patch)
tree69b319b05e5034461840ac6e9b2b9dad5bf4948c /libgomp/plugin
parent4a2e55b3ada20fe6457466bb687a66c8d03e056e (diff)
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>
Diffstat (limited to 'libgomp/plugin')
-rw-r--r--libgomp/plugin/plugin-gcn.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index 27947801ccd..3cdc7ba929f 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -390,6 +390,7 @@ typedef enum {
EF_AMDGPU_MACH_AMDGCN_GFX906 = 0x02f,
EF_AMDGPU_MACH_AMDGCN_GFX908 = 0x030,
EF_AMDGPU_MACH_AMDGCN_GFX90a = 0x03f,
+ EF_AMDGPU_MACH_AMDGCN_GFX90c = 0x032,
EF_AMDGPU_MACH_AMDGCN_GFX1030 = 0x036,
EF_AMDGPU_MACH_AMDGCN_GFX1036 = 0x045,
EF_AMDGPU_MACH_AMDGCN_GFX1100 = 0x041,
@@ -1679,6 +1680,7 @@ const static char *gcn_gfx900_s = "gfx900";
const static char *gcn_gfx906_s = "gfx906";
const static char *gcn_gfx908_s = "gfx908";
const static char *gcn_gfx90a_s = "gfx90a";
+const static char *gcn_gfx90c_s = "gfx90c";
const static char *gcn_gfx1030_s = "gfx1030";
const static char *gcn_gfx1036_s = "gfx1036";
const static char *gcn_gfx1100_s = "gfx1100";
@@ -1702,6 +1704,8 @@ isa_hsa_name (int isa) {
return gcn_gfx908_s;
case EF_AMDGPU_MACH_AMDGCN_GFX90a:
return gcn_gfx90a_s;
+ case EF_AMDGPU_MACH_AMDGCN_GFX90c:
+ return gcn_gfx90c_s;
case EF_AMDGPU_MACH_AMDGCN_GFX1030:
return gcn_gfx1030_s;
case EF_AMDGPU_MACH_AMDGCN_GFX1036:
@@ -1749,6 +1753,9 @@ isa_code(const char *isa) {
if (!strncmp (isa, gcn_gfx90a_s, gcn_isa_name_len))
return EF_AMDGPU_MACH_AMDGCN_GFX90a;
+ if (!strncmp (isa, gcn_gfx90c_s, gcn_isa_name_len))
+ return EF_AMDGPU_MACH_AMDGCN_GFX90c;
+
if (!strncmp (isa, gcn_gfx1030_s, gcn_isa_name_len))
return EF_AMDGPU_MACH_AMDGCN_GFX1030;
@@ -1778,6 +1785,8 @@ max_isa_vgprs (int isa)
return 256;
case EF_AMDGPU_MACH_AMDGCN_GFX90a:
return 512;
+ case EF_AMDGPU_MACH_AMDGCN_GFX90c:
+ return 256;
case EF_AMDGPU_MACH_AMDGCN_GFX1030:
case EF_AMDGPU_MACH_AMDGCN_GFX1036:
return 512; /* 512 SIMD32 = 256 wavefrontsize64. */