From patchwork Fri Mar 22 14:45:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1914966 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=M3AsFmvj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V1QBr5hHDz1yWp for ; Sat, 23 Mar 2024 01:46:43 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 699193858403 for ; Fri, 22 Mar 2024 14:46:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by sourceware.org (Postfix) with ESMTPS id 0F6CB3858D28 for ; Fri, 22 Mar 2024 14:46:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0F6CB3858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0F6CB3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::329 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711118780; cv=none; b=WdlxUgWtZol5vWdJbs84q+aiLngC3S1233VjAmdpq3K/q3tFZ+gyuhLOXzWeyKtTBD98gazmjsI5Yndj2FzPOVJ3gWPSk4G/975qFcMWEL1W7cvsv0pNxnxfBLorbFiuzF/8qh7PNKVfcdjpdW51LAqM8EG5/vBiG4Kxr/CRRq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711118780; c=relaxed/simple; bh=UacRWZFTu5Azey64pA7uoDBTuj/RSXmbxGsPsL6BIp4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=JI2EW32rM3Aw2OsnSqhNJ0WZBaO7MyLE9BFcqkMYe2cuELKVOHgHF4xLh6ZWNz90o+MrSYt06c9skI1YGVoCFUmW8mTpkIyIGgNLKGnQbyBiOYSTUDgoPPFol00U2urNEAXdXNHvu2seKn9rFUOZmwMtI3X4zrbSbdNLz9Iu0/Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4147c8e7965so4219305e9.2 for ; Fri, 22 Mar 2024 07:46:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1711118768; x=1711723568; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=7W7QqG2NI6wlq0aiHeKPUlx9+WwxEIMx2WOwSyocM9E=; b=M3AsFmvjXv9k5J9U5gp2MIWFWSflahNn6PBq+hdFpNCI5yJxh5Da57zNDg2LNetxwZ /eLf3JS5cIBgO7FhzWhPzDCKNQIZBOVNGwfeoYbiFWxx/SB+j/kR8tkc9u4/5anLNYZy A8qmeNW2WL7DX52UdE7A+6OkApSI/yirb1Tv6KinPC4r0Dv4m6seJI8JKNTv7x5XilL0 R8D+14laxpA8wv8Xy9MrbPl4sQjggq/lYQ6wNzo3218HHN4FtddGB0jwHcFGu8NyvhSz DqGlZYqcTGl32gnGBnIs9+ZP7uMGWkmavknf/Ewvpff+lcBt2Y1KzUcbf460nM8o2UVE l4Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711118768; x=1711723568; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7W7QqG2NI6wlq0aiHeKPUlx9+WwxEIMx2WOwSyocM9E=; b=FgAxFvODTG8Kr/hRkfROwq7a4KDgq7HrVeqQPc7LTNbxZ4D1n2Jrjqcx5qH97yHJMO 3wcy8OJN0IchN4H2dSorX5SisAIvAtCk3OBHNcTeh4Eq1Rd0U6xzAY4xsvK4EjLOcEMK GHsLd1ck5GIAh9RJ4R4G1+wBqnRWDNPGCFvaCvm73iQP6GzkPktyFYb6h3bF7ecMRI8I J3oiyWsDvciXZIh6uAdFjdVA2+I5QfVYGAMqF41uH3qdWROCQ6dwOGbfrfHDYE1O4iEf 2lNhX9JjISZju6mogUKx/sIiV+CBmkbEYfiF2oonEIHDwhUzqh8CsVguAl/3eNPlrOUb kbWw== X-Gm-Message-State: AOJu0YwVwnER5wlI9ugpS1jE0sdTnm8r1CT/5tyZnUeZ3RopA4ErPDrT 09ar3n1YMfbeVdol92w3Qtur8tjpLKt/bKgbx7OmeVDvxqkxh1+sz26fksPbAkypca9UfGKGtLA ukzE= X-Google-Smtp-Source: AGHT+IEv3OxZEu9PXEDpslSesv6Irjvm6Es4drJz9qRPmyliL50kPsBUcyrj3r9NgBs+00oySIfYZw== X-Received: by 2002:a5d:4986:0:b0:33e:d396:bc41 with SMTP id r6-20020a5d4986000000b0033ed396bc41mr1626429wrq.71.1711118767524; Fri, 22 Mar 2024 07:46:07 -0700 (PDT) Received: from localhost.localdomain (hawk-18-b2-v4wan-167765-cust1304.vm26.cable.virginm.net. [82.41.69.25]) by smtp.googlemail.com with ESMTPSA id l15-20020adfa38f000000b0033e03a6b1ecsm2236068wrb.18.2024.03.22.07.46.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Mar 2024 07:46:07 -0700 (PDT) From: Andrew Stubbs To: gcc-patches@gcc.gnu.org Subject: [committed] amdgcn: Add gfx1103 target Date: Fri, 22 Mar 2024 14:45:53 +0000 Message-ID: <20240322144553.726435-1-ams@baylibre.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org This patch adds 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. This device should be considered "Experimental" at this point, although so far it seems to be at least as functional as gfx1100. Committed to mainline. Andrew 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. --- gcc/config.gcc | 4 ++-- gcc/config/gcn/gcn-hsa.h | 6 +++--- gcc/config/gcn/gcn-opts.h | 4 +++- gcc/config/gcn/gcn.cc | 14 ++++++++++++-- gcc/config/gcn/gcn.h | 2 ++ gcc/config/gcn/gcn.opt | 3 +++ gcc/config/gcn/mkoffload.cc | 5 +++++ gcc/config/gcn/t-omp-device | 2 +- gcc/doc/install.texi | 13 +++++++------ gcc/doc/invoke.texi | 3 +++ libgomp/plugin/plugin-gcn.c | 10 +++++++++- 11 files changed, 50 insertions(+), 16 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 040afabd9ec..87a5c92b6e3 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4560,7 +4560,7 @@ case "${target}" in for which in arch tune; do eval "val=\$with_$which" case ${val} in - "" | fiji | gfx900 | gfx906 | gfx908 | gfx90a | gfx1030 | gfx1100) + "" | fiji | gfx900 | gfx906 | gfx908 | gfx90a | gfx1030 | gfx1100 | gfx1103) # OK ;; *) @@ -4576,7 +4576,7 @@ case "${target}" in TM_MULTILIB_CONFIG= ;; xdefault | xyes) - TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a,gfx1030,gfx1100" | sed "s/${with_arch},\?//;s/,$//"` + TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a,gfx1030,gfx1100,gfx1103" | sed "s/${with_arch},\?//;s/,$//"` ;; *) TM_MULTILIB_CONFIG="${with_multilib_list}" diff --git a/gcc/config/gcn/gcn-hsa.h b/gcc/config/gcn/gcn-hsa.h index c75256dbac3..ac32b8a328f 100644 --- a/gcc/config/gcn/gcn-hsa.h +++ b/gcc/config/gcn/gcn-hsa.h @@ -90,7 +90,7 @@ extern unsigned int gcn_local_sym_hash (const char *name); 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=gfx1100:;" \ +#define NO_XNACK "march=fiji:;march=gfx1030:;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:;" @@ -106,8 +106,8 @@ extern unsigned int gcn_local_sym_hash (const char *name); "%{" ABI_VERSION_SPEC "} " \ "%{" NO_XNACK XNACKOPT "} " \ "%{" NO_SRAM_ECC SRAMOPT "} " \ - "%{march=gfx1030|march=gfx1100:-mattr=+wavefrontsize64} " \ - "%{march=gfx1030|march=gfx1100:-mattr=+cumode} " \ + "%{march=gfx1030|march=gfx1100|march=gfx1103:-mattr=+wavefrontsize64} " \ + "%{march=gfx1030|march=gfx1100|march=gfx1103:-mattr=+cumode} " \ "-filetype=obj" #define LINK_SPEC "--pie --export-dynamic" #define LIB_SPEC "-lc" diff --git a/gcc/config/gcn/gcn-opts.h b/gcc/config/gcn/gcn-opts.h index 6be2c9204fa..285746f7f4d 100644 --- a/gcc/config/gcn/gcn-opts.h +++ b/gcc/config/gcn/gcn-opts.h @@ -26,7 +26,8 @@ enum processor_type PROCESSOR_GFX908, PROCESSOR_GFX90a, PROCESSOR_GFX1030, - PROCESSOR_GFX1100 + PROCESSOR_GFX1100, + PROCESSOR_GFX1103 }; #define TARGET_FIJI (gcn_arch == PROCESSOR_FIJI) @@ -36,6 +37,7 @@ enum processor_type #define TARGET_GFX90a (gcn_arch == PROCESSOR_GFX90a) #define TARGET_GFX1030 (gcn_arch == PROCESSOR_GFX1030) #define TARGET_GFX1100 (gcn_arch == PROCESSOR_GFX1100) +#define TARGET_GFX1103 (gcn_arch == PROCESSOR_GFX1103) /* Set in gcn_option_override. */ extern enum gcn_isa { diff --git a/gcc/config/gcn/gcn.cc b/gcc/config/gcn/gcn.cc index fca001811e5..498146dcde9 100644 --- a/gcc/config/gcn/gcn.cc +++ b/gcc/config/gcn/gcn.cc @@ -140,6 +140,7 @@ gcn_option_override (void) : gcn_arch == PROCESSOR_GFX90a ? ISA_CDNA2 : gcn_arch == PROCESSOR_GFX1030 ? ISA_RDNA2 : gcn_arch == PROCESSOR_GFX1100 ? ISA_RDNA3 + : gcn_arch == PROCESSOR_GFX1103 ? ISA_RDNA3 : ISA_UNKNOWN); gcc_assert (gcn_isa != ISA_UNKNOWN); @@ -164,13 +165,15 @@ gcn_option_override (void) /* gfx803 "Fiji", gfx1030 and gfx1100 do not support XNACK. */ if (gcn_arch == PROCESSOR_FIJI || gcn_arch == PROCESSOR_GFX1030 - || gcn_arch == PROCESSOR_GFX1100) + || 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_GFX1100 ? "gfx1100" + : gcn_arch == PROCESSOR_GFX1103 ? "gfx1103" : NULL)); /* Allow HSACO_ATTR_ANY silently because that's the default. */ flag_xnack = HSACO_ATTR_OFF; @@ -3048,6 +3051,8 @@ gcn_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait, return gcn_arch == PROCESSOR_GFX1030; if (strcmp (name, "gfx1100") == 0) return gcn_arch == PROCESSOR_GFX1100; + if (strcmp (name, "gfx1103") == 0) + return gcn_arch == PROCESSOR_GFX1103; return 0; default: gcc_unreachable (); @@ -6558,6 +6563,11 @@ output_file_start (void) xnack = ""; sram_ecc = ""; break; + case PROCESSOR_GFX1103: + cpu = "gfx1103"; + xnack = ""; + sram_ecc = ""; + break; default: gcc_unreachable (); } @@ -6705,7 +6715,7 @@ gcn_hsa_declare_function_name (FILE *file, const char *name, xnack_enabled, LDS_SIZE); /* Not supported with 'architected flat scratch'. */ - if (gcn_arch != PROCESSOR_GFX1100) + if (!TARGET_RDNA3) fprintf (file, "\t .amdhsa_reserve_flat_scratch\t0\n"); if (gcn_arch == PROCESSOR_GFX90a) diff --git a/gcc/config/gcn/gcn.h b/gcc/config/gcn/gcn.h index c314c7b4ae8..b003db6cd26 100644 --- a/gcc/config/gcn/gcn.h +++ b/gcc/config/gcn/gcn.h @@ -51,6 +51,8 @@ builtin_define ("__gfx1030"); \ else if (TARGET_GFX1100) \ builtin_define ("__gfx1100__"); \ + else if (TARGET_GFX1103) \ + builtin_define ("__gfx1103__"); \ else \ gcc_unreachable (); \ } while (0) diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt index 842fd36d25c..e06a2849d90 100644 --- a/gcc/config/gcn/gcn.opt +++ b/gcc/config/gcn/gcn.opt @@ -46,6 +46,9 @@ Enum(gpu_type) String(gfx1030) Value(PROCESSOR_GFX1030) EnumValue Enum(gpu_type) String(gfx1100) Value(PROCESSOR_GFX1100) +EnumValue +Enum(gpu_type) String(gfx1103) Value(PROCESSOR_GFX1103) + march= Target RejectNegative Negative(march=) Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_FIJI) Specify the name of the target GPU. diff --git a/gcc/config/gcn/mkoffload.cc b/gcc/config/gcn/mkoffload.cc index fe443abba21..58eeada8295 100644 --- a/gcc/config/gcn/mkoffload.cc +++ b/gcc/config/gcn/mkoffload.cc @@ -61,6 +61,8 @@ #define EF_AMDGPU_MACH_AMDGCN_GFX1030 0x36 #undef EF_AMDGPU_MACH_AMDGCN_GFX1100 #define EF_AMDGPU_MACH_AMDGCN_GFX1100 0x41 +#undef EF_AMDGPU_MACH_AMDGCN_GFX1103 +#define EF_AMDGPU_MACH_AMDGCN_GFX1103 0x44 #define EF_AMDGPU_FEATURE_XNACK_V4 0x300 /* Mask. */ #define EF_AMDGPU_FEATURE_XNACK_UNSUPPORTED_V4 0x000 @@ -971,6 +973,8 @@ main (int argc, char **argv) elf_arch = EF_AMDGPU_MACH_AMDGCN_GFX1030; else if (strcmp (argv[i], "-march=gfx1100") == 0) elf_arch = EF_AMDGPU_MACH_AMDGCN_GFX1100; + else if (strcmp (argv[i], "-march=gfx1103") == 0) + elf_arch = EF_AMDGPU_MACH_AMDGCN_GFX1103; #define STR "-mstack-size=" else if (startswith (argv[i], STR)) gcn_stack_size = atoi (argv[i] + strlen (STR)); @@ -1013,6 +1017,7 @@ main (int argc, char **argv) case EF_AMDGPU_MACH_AMDGCN_GFX803: case EF_AMDGPU_MACH_AMDGCN_GFX1030: case EF_AMDGPU_MACH_AMDGCN_GFX1100: + case EF_AMDGPU_MACH_AMDGCN_GFX1103: SET_XNACK_UNSET (elf_flags); SET_SRAM_ECC_UNSET (elf_flags); break; diff --git a/gcc/config/gcn/t-omp-device b/gcc/config/gcn/t-omp-device index 2315ad594a3..037df2657cc 100644 --- a/gcc/config/gcn/t-omp-device +++ b/gcc/config/gcn/t-omp-device @@ -1,4 +1,4 @@ omp-device-properties-gcn: $(srcdir)/config/gcn/gcn.cc echo kind: gpu > $@ echo arch: amdgcn gcn >> $@ - echo isa: fiji gfx803 gfx900 gfx906 gfx908 gfx90a gfx1030 gfx1100 >> $@ + echo isa: fiji gfx803 gfx900 gfx906 gfx908 gfx90a gfx1030 gfx1100 gfx1103 >> $@ diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 014ca25aa62..a9872e86bee 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1266,11 +1266,11 @@ default set of libraries is selected based on the value of @item amdgcn*-*-* @var{list} is a comma separated list of ISA names (allowed values: @code{fiji}, @code{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}, @code{gfx1030}, -@code{gfx1100}). It ought not include the name of the default ISA, specified -via @option{--with-arch}. If @var{list} is empty, then there will be no -multilibs and only the default run-time library will be built. If @var{list} -is @code{default} or @option{--with-multilib-list=} is not specified, then -the default set of libraries is selected. +@code{gfx1100}, @code{gfx1103}). It ought not include the name of the default +ISA, specified via @option{--with-arch}. If @var{list} is empty, then there +will be no multilibs and only the default run-time library will be built. If +@var{list} is @code{default} or @option{--with-multilib-list=} is not +specified, then the default set of libraries is selected. @item arm*-*-* @var{list} is a comma separated list of @code{aprofile} and @@ -3940,7 +3940,8 @@ Instead of GNU Binutils, you will need to install LLVM 15, or later, and copy @file{bin/llvm-nm} to @file{amdgcn-amdhsa/bin/nm}, and @file{bin/llvm-ar} to both @file{bin/amdgcn-amdhsa-ar} and @file{bin/amdgcn-amdhsa-ranlib}. Note that LLVM 13.0.1 or LLVM 14 can be used -by specifying a @code{--with-multilib-list=} that does not list @code{gfx1100}. +by specifying a @code{--with-multilib-list=} that does not list @code{gfx1100} +and @code{gfx1103}. Use Newlib (4.3.0 or newer; 4.4.0 or later is recommended). diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index e0950ca5dc2..e7b96212354 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21795,6 +21795,9 @@ Compile for RDNA2 gfx1030 devices (GFX10 series). @item gfx1100 Compile for RDNA3 gfx1100 devices (GFX11 series). +@item gfx1103 +Compile for RDNA3 gfx1103 devices (GFX11 series). + @end table @opindex msram-ecc 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");