for which in arch tune; do
eval "val=\$with_$which"
case ${val} in
- "" | fiji | gfx900 | gfx906 | gfx908 | gfx90a | gfx90c | gfx1030 | gfx1036 | gfx1100 | gfx1103)
+ "" | gfx900 | gfx906 | gfx908 | gfx90a | gfx90c | gfx1030 | gfx1036 | gfx1100 | gfx1103)
# OK
;;
*)
default; however, when debugging symbols are turned on, mkoffload.cc
writes a new AMD GPU object file and the ABI version needs to be the
same. - LLVM <= 17 defaults to 4 while LLVM >= 18 defaults to 5.
- GCC supports LLVM >= 13.0.1 and only LLVM >= 14 supports version 5.
- Note that Fiji is only supported with LLVM <= 17 as version 3 is no longer
- supported in LLVM >= 18. */
-#define ABI_VERSION_SPEC "march=fiji:--amdhsa-code-object-version=3;" \
- "!march=*|march=*:--amdhsa-code-object-version=4"
+ GCC supports LLVM >= 13.0.1 and only LLVM >= 14 supports version 5. */
+#define ABI_VERSION_SPEC "--amdhsa-code-object-version=4"
/* Note that the XNACK and SRAM-ECC settings must match those in mkoffload.cc
as the latter creates new ELF object file when debugging is enabled and
the ELF flags (e_flags) of that generated file must be identical to those
generated by the compiler. */
-#define NO_XNACK "march=fiji:;march=gfx1030:;march=gfx1036:;march=gfx1100:;march=gfx1103:;" \
+#define NO_XNACK "march=gfx1030:;march=gfx1036:;march=gfx1100:;march=gfx1103:;" \
/* These match the defaults set in gcn.cc. */ \
"!mxnack*|mxnack=default:%{march=gfx900|march=gfx906|march=gfx908:-mattr=-xnack};"
-#define NO_SRAM_ECC "!march=*:;march=fiji:;march=gfx900:;march=gfx906:;march=gfx90c:;"
+#define NO_SRAM_ECC "!march=*:;march=gfx900:;march=gfx906:;march=gfx90c:;"
/* In HSACOv4 no attribute setting means the binary supports "any" hardware
configuration. The name of the attribute also changed. */
/* Use LLVM assembler and linker options. */
#define ASM_SPEC "-triple=amdgcn--amdhsa " \
"%{march=*:-mcpu=%*} " \
- "%{" ABI_VERSION_SPEC "} " \
+ ABI_VERSION_SPEC " " \
"%{" NO_XNACK XNACKOPT "} " \
"%{" NO_SRAM_ECC SRAMOPT "} " \
"%{march=gfx1030|march=gfx1036|march=gfx1100|march=gfx1103:-mattr=+wavefrontsize64} " \
/* Which processor to generate code or schedule for. */
enum processor_type
{
- PROCESSOR_FIJI, // gfx803
PROCESSOR_VEGA10, // gfx900
PROCESSOR_VEGA20, // gfx906
PROCESSOR_GFX908,
PROCESSOR_GFX1103
};
-#define TARGET_FIJI (gcn_arch == PROCESSOR_FIJI)
#define TARGET_VEGA10 (gcn_arch == PROCESSOR_VEGA10)
#define TARGET_VEGA20 (gcn_arch == PROCESSOR_VEGA20)
#define TARGET_GFX908 (gcn_arch == PROCESSOR_GFX908)
if (!flag_pic)
flag_pic = flag_pie;
- gcn_isa = (gcn_arch == PROCESSOR_FIJI ? ISA_GCN3
- : gcn_arch == PROCESSOR_VEGA10 ? ISA_GCN5
+ gcn_isa = (gcn_arch == PROCESSOR_VEGA10 ? ISA_GCN5
: gcn_arch == PROCESSOR_VEGA20 ? ISA_GCN5
: gcn_arch == PROCESSOR_GFX908 ? ISA_CDNA1
: gcn_arch == PROCESSOR_GFX90a ? ISA_CDNA2
acc_lds_size = 32768;
}
- /* gfx803 "Fiji", gfx1030 and gfx1100 do not support XNACK. */
- if (gcn_arch == PROCESSOR_FIJI
- || gcn_arch == PROCESSOR_GFX1030
+ /* gfx1030 and gfx1100 do not support XNACK. */
+ if (gcn_arch == PROCESSOR_GFX1030
|| gcn_arch == PROCESSOR_GFX1036
|| gcn_arch == PROCESSOR_GFX1100
|| gcn_arch == PROCESSOR_GFX1103)
{
if (flag_xnack == HSACO_ATTR_ON)
error ("%<-mxnack=on%> is incompatible with %<-march=%s%>",
- (gcn_arch == PROCESSOR_FIJI ? "fiji"
- : gcn_arch == PROCESSOR_GFX1030 ? "gfx1030"
+ (gcn_arch == PROCESSOR_GFX1030 ? "gfx1030"
: gcn_arch == PROCESSOR_GFX1036 ? "gfx1036"
: gcn_arch == PROCESSOR_GFX1100 ? "gfx1100"
: gcn_arch == PROCESSOR_GFX1103 ? "gfx1103"
if (flag_xnack == HSACO_ATTR_DEFAULT)
switch (gcn_arch)
{
- case PROCESSOR_FIJI:
case PROCESSOR_VEGA10:
case PROCESSOR_VEGA20:
case PROCESSOR_GFX908:
case omp_device_arch:
return strcmp (name, "amdgcn") == 0 || strcmp (name, "gcn") == 0;
case omp_device_isa:
- if (strcmp (name, "fiji") == 0 || strcmp (name, "gfx803") == 0)
- return gcn_arch == PROCESSOR_FIJI;
if (strcmp (name, "gfx900") == 0)
return gcn_arch == PROCESSOR_VEGA10;
if (strcmp (name, "gfx906") == 0)
const char *cpu;
switch (gcn_arch)
{
- case PROCESSOR_FIJI:
- cpu = "gfx803";
- xnack = "";
- sram_ecc = "";
- break;
case PROCESSOR_VEGA10:
cpu = "gfx900";
sram_ecc = "";
builtin_define ("__RDNA3__"); \
else \
gcc_unreachable (); \
- if (TARGET_FIJI) \
- { \
- builtin_define ("__fiji__"); \
- builtin_define ("__gfx803__"); \
- } \
- else if (TARGET_VEGA10) \
+ if (TARGET_VEGA10) \
builtin_define ("__gfx900__"); \
else if (TARGET_VEGA20) \
builtin_define ("__gfx906__"); \
Name(gpu_type) Type(enum processor_type)
GCN GPU type to use:
-EnumValue
-Enum(gpu_type) String(fiji) Value(PROCESSOR_FIJI)
-
EnumValue
Enum(gpu_type) String(gfx900) Value(PROCESSOR_VEGA10)
Enum(gpu_type) String(gfx1103) Value(PROCESSOR_GFX1103)
march=
-Target RejectNegative Negative(march=) Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_FIJI)
+Target RejectNegative Negative(march=) Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_VEGA10)
Specify the name of the target GPU.
mtune=
-Target RejectNegative Negative(mtune=) Joined ToLower Enum(gpu_type) Var(gcn_tune) Init(PROCESSOR_FIJI)
+Target RejectNegative Negative(mtune=) Joined ToLower Enum(gpu_type) Var(gcn_tune) Init(PROCESSOR_VEGA10)
Specify the name of the target GPU.
m32
#undef ELFABIVERSION_AMDGPU_HSA_V4
#define ELFABIVERSION_AMDGPU_HSA_V4 2
-#undef EF_AMDGPU_MACH_AMDGCN_GFX803
-#define EF_AMDGPU_MACH_AMDGCN_GFX803 0x2a
#undef EF_AMDGPU_MACH_AMDGCN_GFX900
#define EF_AMDGPU_MACH_AMDGCN_GFX900 0x2c
#undef EF_AMDGPU_MACH_AMDGCN_GFX906
/* We only support host relocations of x86_64, for now. */
gcc_assert (ehdr.e_machine == EM_X86_64);
- /* Fiji devices use HSACOv3 regardless of the assembler. */
- uint32_t elf_flags_actual = (elf_arch == EF_AMDGPU_MACH_AMDGCN_GFX803
- ? 0 : elf_flags);
-
/* Patch the correct elf architecture flag into the file. */
ehdr.e_ident[7] = ELFOSABI_AMDGPU_HSA;
- ehdr.e_ident[8] = (elf_arch == EF_AMDGPU_MACH_AMDGCN_GFX803
- ? ELFABIVERSION_AMDGPU_HSA_V3
- : ELFABIVERSION_AMDGPU_HSA_V4);
+ ehdr.e_ident[8] = ELFABIVERSION_AMDGPU_HSA_V4;
ehdr.e_type = ET_REL;
ehdr.e_machine = EM_AMDGPU;
- ehdr.e_flags = elf_arch | elf_flags_actual;
+ ehdr.e_flags = elf_arch | elf_flags;
/* Load the section headers so we can walk them later. */
Elf64_Shdr *sections = (Elf64_Shdr *)xmalloc (sizeof (Elf64_Shdr)
static int
get_arch (const char *str, const char *with_arch_str)
{
- if (strcmp (str, "fiji") == 0)
- return EF_AMDGPU_MACH_AMDGCN_GFX803;
- else if (strcmp (str, "gfx900") == 0)
+ if (strcmp (str, "gfx900") == 0)
return EF_AMDGPU_MACH_AMDGCN_GFX900;
else if (strcmp (str, "gfx906") == 0)
return EF_AMDGPU_MACH_AMDGCN_GFX906;
and ASM_SPEC. */
switch (elf_arch)
{
- case EF_AMDGPU_MACH_AMDGCN_GFX803:
case EF_AMDGPU_MACH_AMDGCN_GFX1030:
case EF_AMDGPU_MACH_AMDGCN_GFX1036:
case EF_AMDGPU_MACH_AMDGCN_GFX1100:
omp-device-properties-gcn: $(srcdir)/config/gcn/gcn.cc
echo kind: gpu > $@
echo arch: amdgcn gcn >> $@
- echo isa: fiji gfx803 gfx900 gfx906 gfx908 gfx90a gfx90c gfx1030 gfx1036 gfx1100 gfx1103 >> $@
+ echo isa: gfx900 gfx906 gfx908 gfx90a gfx90c gfx1030 gfx1036 gfx1100 gfx1103 >> $@
@option{--target}.
@item amdgcn*-*-*
-@var{list} is a comma separated list of ISA names (allowed values: @code{fiji},
+@var{list} is a comma separated list of ISA names (allowed values:
@code{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}, @code{gfx90c},
@code{gfx1030}, @code{gfx1036}, @code{gfx1100}, @code{gfx1103}).
It ought not include the name of the default
@file{libexec/gcc/amdhsa-amdhsa/@var{version}/gcn-run} to launch them
on the GPU.
-To enable support for GCN3 Fiji devices (gfx803), GCC has to be configured with
-@option{--with-arch=@code{fiji}} or
-@option{--with-multilib-list=@code{fiji},...}. Note that support for Fiji
-devices has been removed in ROCm 4.0 and support in LLVM was deprecated and has
-been removed in LLVM 18.
-
@html
<hr />
@end html
are
@table @samp
-@item fiji
-Compile for GCN3 Fiji devices (gfx803). Support deprecated; availablility
-depends on how GCC has been configured, see @option{--with-arch} and
-@option{--with-multilib-list}.
-
@item gfx900
Compile for GCN5 Vega 10 devices (gfx900).
@code{i586}, @code{i686}, @code{ia32}
@tab See @code{-m...} flags in ``x86 Options'' (without @code{-m})
@item @code{amdgcn}, @code{gcn}
- @tab See @code{-march=} in ``AMD GCN Options''@footnote{Additionally,
- @code{gfx803} is supported as an alias for @code{fiji}.}
+ @tab See @code{-march=} in ``AMD GCN Options''
@item @code{nvptx}, @code{nvptx64}
@tab See @code{-march=} in ``Nvidia PTX Options''
@end multitable
+++ /dev/null
-/* { dg-do link { target { offload_target_amdgcn } } } */
-/* { dg-additional-options -foffload=amdgcn-amdhsa } */
-/* { dg-additional-options -foffload=-march=fiji } */
-/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
-
-/* { dg-xfail-if "fiji/gfx803 is no longer enabled by default & deprectated in ROCm/LLVM/GCC" { *-*-* } } */
-
-#define USE_FIJI_FOR_GFX803
-#include "declare-variant-4.h"
-
-/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx803 \\(\\);" "optimized" } } */
+++ /dev/null
-/* { dg-do link { target { offload_target_amdgcn } } } */
-/* { dg-additional-options -foffload=amdgcn-amdhsa } */
-/* { dg-additional-options -foffload=-march=fiji } */
-/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
-
-/* { dg-xfail-if "fiji/gfx803 is no longer enabled by default & deprectated in ROCm/LLVM/GCC" { *-*-* } } */
-
-#include "declare-variant-4.h"
-
-/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx803 \\(\\);" "optimized" } } */
#pragma omp declare target
-__attribute__ ((noipa))
-int
-gfx803 (void)
-{
- return 0x803;
-}
-
__attribute__ ((noipa))
int
gfx900 (void)
return 0x1103;
}
-#ifdef USE_FIJI_FOR_GFX803
-#pragma omp declare variant(gfx803) match(device = {isa("fiji")})
-#else
-#pragma omp declare variant(gfx803) match(device = {isa("gfx803")})
-#endif
#pragma omp declare variant(gfx900) match(device = {isa("gfx900")})
#pragma omp declare variant(gfx906) match(device = {isa("gfx906")})
#pragma omp declare variant(gfx908) match(device = {isa("gfx908")})