aboutsummaryrefslogtreecommitdiff
path: root/libgomp/plugin
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@baylibre.com>2024-03-15 14:26:15 +0000
committerAndrew Stubbs <ams@baylibre.com>2024-03-22 14:45:15 +0000
commit1bf18629c54adf4893c8db5227a36e1952ee69a3 (patch)
tree0d293ea7fccbe886d4633f06f23ae64cbaf44bf5 /libgomp/plugin
parentd1d8fd2884b44598d80de1038b086eec41519d4b (diff)
amdgcn: Add gfx1103 target
Add support for the gfx1103 RDNA3 APU integrated graphics devices. The ROCm documentation warns that these may not be supported, but it seems to work at least partially. gcc/ChangeLog: * config.gcc (amdgcn): Add gfx1103 entries. * config/gcn/gcn-hsa.h (NO_XNACK): Likewise. (gcn_local_sym_hash): Likewise. * config/gcn/gcn-opts.h (enum processor_type): Likewise. (TARGET_GFX1103): New macro. * config/gcn/gcn.cc (gcn_option_override): Handle gfx1103. (gcn_omp_device_kind_arch_isa): Likewise. (output_file_start): Likewise. (gcn_hsa_declare_function_name): Use TARGET_RDNA3, not just gfx1100. * config/gcn/gcn.h (TARGET_CPU_CPP_BUILTINS): Add __gfx1103__. * config/gcn/gcn.opt: Add gfx1103. * config/gcn/mkoffload.cc (EF_AMDGPU_MACH_AMDGCN_GFX1103): New. (main): Handle gfx1103. * config/gcn/t-omp-device: Add gfx1103 isa. * doc/install.texi (amdgcn): Add gfx1103. * doc/invoke.texi (-march): Likewise. libgomp/ChangeLog: * plugin/plugin-gcn.c (EF_AMDGPU_MACH): GFX1103. (gcn_gfx1103_s): New. (isa_hsa_name): Handle gfx1103. (isa_code): Likewise. (max_isa_vgprs): Likewise.
Diffstat (limited to 'libgomp/plugin')
-rw-r--r--libgomp/plugin/plugin-gcn.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c
index 7e141a85f31..53dc1c7d23a 100644
--- a/libgomp/plugin/plugin-gcn.c
+++ b/libgomp/plugin/plugin-gcn.c
@@ -391,7 +391,8 @@ typedef enum {
EF_AMDGPU_MACH_AMDGCN_GFX908 = 0x030,
EF_AMDGPU_MACH_AMDGCN_GFX90a = 0x03f,
EF_AMDGPU_MACH_AMDGCN_GFX1030 = 0x036,
- EF_AMDGPU_MACH_AMDGCN_GFX1100 = 0x041
+ EF_AMDGPU_MACH_AMDGCN_GFX1100 = 0x041,
+ EF_AMDGPU_MACH_AMDGCN_GFX1103 = 0x044
} EF_AMDGPU_MACH;
const static int EF_AMDGPU_MACH_MASK = 0x000000ff;
@@ -1677,6 +1678,7 @@ const static char *gcn_gfx908_s = "gfx908";
const static char *gcn_gfx90a_s = "gfx90a";
const static char *gcn_gfx1030_s = "gfx1030";
const static char *gcn_gfx1100_s = "gfx1100";
+const static char *gcn_gfx1103_s = "gfx1103";
const static int gcn_isa_name_len = 7;
/* Returns the name that the HSA runtime uses for the ISA or NULL if we do not
@@ -1700,6 +1702,8 @@ isa_hsa_name (int isa) {
return gcn_gfx1030_s;
case EF_AMDGPU_MACH_AMDGCN_GFX1100:
return gcn_gfx1100_s;
+ case EF_AMDGPU_MACH_AMDGCN_GFX1103:
+ return gcn_gfx1103_s;
}
return NULL;
}
@@ -1745,6 +1749,9 @@ isa_code(const char *isa) {
if (!strncmp (isa, gcn_gfx1100_s, gcn_isa_name_len))
return EF_AMDGPU_MACH_AMDGCN_GFX1100;
+ if (!strncmp (isa, gcn_gfx1103_s, gcn_isa_name_len))
+ return EF_AMDGPU_MACH_AMDGCN_GFX1103;
+
return EF_AMDGPU_MACH_UNSUPPORTED;
}
@@ -1765,6 +1772,7 @@ max_isa_vgprs (int isa)
case EF_AMDGPU_MACH_AMDGCN_GFX1030:
return 512; /* 512 SIMD32 = 256 wavefrontsize64. */
case EF_AMDGPU_MACH_AMDGCN_GFX1100:
+ case EF_AMDGPU_MACH_AMDGCN_GFX1103:
return 1536; /* 1536 SIMD32 = 768 wavefrontsize64. */
}
GOMP_PLUGIN_fatal ("unhandled ISA in max_isa_vgprs");