From patchwork Wed Jan 24 16:01:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 191636 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp1085372dyi; Wed, 24 Jan 2024 08:02:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHZ3PLevQl5b+tt8sM4Ld7xhcLpeFMvodX2Sjym9P52kJGOgbSxWFU39NeiVgoD1AsswcC5 X-Received: by 2002:a05:6214:19cd:b0:681:73a9:f9fe with SMTP id j13-20020a05621419cd00b0068173a9f9femr2754986qvc.20.1706112167609; Wed, 24 Jan 2024 08:02:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706112167; cv=pass; d=google.com; s=arc-20160816; b=rSLfB5yLAYAFtjUMS9p2ZB1+JrO+F/QJUJA0Xu7nW2Qrs8ezv7etOl9efZUhiSZskm /rwFYCxZOJdE9VtTLgcCX1UeDFQxXg4f7+I3DTzP6wB3UMKXsorBA43e9XihT7c+9qRj HL9yo+ILj1O1UDoxPry9jiboltgTEvv0v8RitjNWpGofRVbIF1vKgEtSt6JVgx54eFfq mOOuDpI/XMQckNdKMt7psXeG49yY1NJF29thLucc+EgqdRfKzhoag8FSuU8u6xFFIsvF u9FfibZCq+ivKdhXoeuK4n9Hgrd9QYIww4SMbhJv4lg/EA54bI4hSM4DuD0dCo0hZVtH 7VUg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:in-reply-to:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=JZDQQQL89TTIpi40OUzWIGygbS/IWaUzAsHa0TF+plc=; fh=es4MZHjgM0squs1B204d4Wkc6aFclJ1okFqMMDHbPEY=; b=KIWi0PsTPa4PEik07MDfvp8t14mjSqV56DK3tTAzErAtH2lunGIJRwOAvoh8GLp8nu GSjwK8C/Ki51hG/CQhuQcVV2X1BE6N+r/+TVAgHpqygJHUkTMWreugM32WqNP054JhMB IeGMjHJJkC1ittoxZ0ThC801LxMU9YqSrzEPzyf9PlrnG4wl11IA2zC321mMHNGOMi4d DMPo2LaNB9meWxxHfy1t0uOmUNEVbbbFCl9LFBLOsOfR/X3I123jl0cFDlAhbqkOblRT S7ml0uhN2z7H6JTXlH6mVnOVdVv1ICkZBzifNvJXsiTEr9wcSWGXkg8m9yjfX6XdiIOM 0HBQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=ZMQmjRtw; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id e3-20020a0ce3c3000000b0068179e48e97si10601460qvl.164.2024.01.24.08.02.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 08:02:46 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=ZMQmjRtw; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 583DB3861838 for ; Wed, 24 Jan 2024 16:02:11 +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 B47A13858401 for ; Wed, 24 Jan 2024 16:01:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B47A13858401 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 B47A13858401 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=1706112084; cv=none; b=HsqXbVTn7oies5m0GSzlGFIRVQrLaN6X4FoAfzeyediMzVOTqrMkCGQvWpAMhfLUNg/AROngQwCi68EHI/rSX/ae8PG+S+WpvkNVcyKMAUrrmuzKOhlnHebgTtpAYhpsR4Fec36OTXG/SH6c4ZA97DT256zfDKBd0WxdQt4ubdo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706112084; c=relaxed/simple; bh=9HPCSMvwI9dJn7I4KniH1xdxG0RK16IpLHESjaoN/7k=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=szTqWrPfDZJHQI2AIrv7pu3/o2X1aOIdehJ9nE+LrxcDtQ8EvGz3MBEJyvx4z7Qo1MzbxSNYyBRMgvGrHpRHhBdWYcs7vkzUGBboXIYdaDD0WWjtE+gEjZgKRBLvNK3NUbf4YTP73CSQKH/T63JsQkJ7hsF10L9cJGdl7XlxsiQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40e86a9fc4bso72632685e9.2 for ; Wed, 24 Jan 2024 08:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1706112080; x=1706716880; darn=gcc.gnu.org; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=JZDQQQL89TTIpi40OUzWIGygbS/IWaUzAsHa0TF+plc=; b=ZMQmjRtwc2+wVRfgeUDN/6qscq/81GNb41ZkXrXl0jPbPxD+bc0Xn/4KDcbEnEKY+9 JWyFP6HQ3Qdv0Z7oxTrMm4KtahWjhQUW1x9nFy6sRCSHz9fmIIA5VMOBTUIA+YugGJyf nUMbgSgkzX0wcdHt4ZNWKogO7n+pLbR3g7pTwnW+YL2c8eb7ELlZq2+minIaT8FfI/JM m9MoD5w8+apBeKRISpAfIGBymXDsPLSzUiJsJLlpqKmarW2mJzrkCLAhZyMNTqFWdO7e 1jad/4Psvr7upU2OxvT5RjNsU7jDlC0K90IpM+RMoZ9835sFwBC3KVwP4yrpsi7dSamC 59HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706112080; x=1706716880; h=in-reply-to:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=JZDQQQL89TTIpi40OUzWIGygbS/IWaUzAsHa0TF+plc=; b=nCoi6Ozp0myupQUPbFptqg4jfIxXjWUI7M7/HZ8esPUxeHyrUQRqcPKz8ENiQxUkxG rSomjTEveqWICKwZEExJzvKma4JliU4rUdfNA2yAKO/JHTYBeeaAswo+xGNhvrzjGGE6 a8I1fUkgEWQ5AvuneCfacTU+bh5c6GUga06ZrxOA6fG7dJQrLmEJLe28c+eExfhM08ng +h1EZ7YsrujB4eyb+rBlJWlBSn8m2xrMSJ9HM+bUFTUZK9gQBGEhFAaV3DX4XRJWN2PM AsoFGIH6dBnJBjlNTWtvIuVVREJH5LJDbUtKZ86f2aRbbnyI5M0XoxULxPC0mqaGiDie ayBw== X-Gm-Message-State: AOJu0YwaiyZlGZdiMOhc7X1j4QjmSM70KnAdkKCsqgvu/o7KnBzA2tJV Tt+T61ZaXBNON/qC5pGQtyIW52q6zlhP/pKbayuELxVhg8Cz7zPbCpJ7XlzwLRJ/XKrNWIpWx3a pX3jQIg== X-Received: by 2002:a05:600c:5812:b0:40e:5808:53f9 with SMTP id jz18-20020a05600c581200b0040e580853f9mr1210463wmb.73.1706112080083; Wed, 24 Jan 2024 08:01:20 -0800 (PST) Received: from ?IPV6:2001:16b8:3f15:5000:be03:58ff:fe31:f74? ([2001:16b8:3f15:5000:be03:58ff:fe31:f74]) by smtp.gmail.com with ESMTPSA id m17-20020a056000009100b0033928aadde1sm2738427wrx.48.2024.01.24.08.01.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Jan 2024 08:01:19 -0800 (PST) Message-ID: <14019d71-7ffb-40e6-892f-5d8168242614@baylibre.com> Date: Wed, 24 Jan 2024 17:01:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [patch] amdgcn: config.gcc - enable gfx1100 multilib; add gfx1100 to docs (was: [PATCH] amdgcn: additional gfx1100 support) Content-Language: en-US To: Andrew Stubbs , gcc-patches@gcc.gnu.org Cc: pa@codesourcery.com, rguenther@suse.de References: <20240124124304.1780645-1-ams@baylibre.com> From: Tobias Burnus In-Reply-To: <20240124124304.1780645-1-ams@baylibre.com> X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788988271495889777 X-GMAIL-MSGID: 1788988271495889777 This patch obviously depends on Andrew's; he wrote in the previous email of this thread regarding his patch: Andrew Stubbs wrote: > This is enough to get gfx1100 working for most purposes, on top of the > patch that Tobias committed a week or so ago; there are still some test > failures to investigate, and probably some tuning to do. > > It might also get gfx1030 working too. @Richi, could you test it, > please? > > I can't test the other multilibs right now. @PA, can you test it please? > > I can self-approve the patch, but I'll hold off the commit until the > test results come back. Okay to enable gfx1100 multilib building and to document gfx1100 in the manual? (I mean, obviously, only after Andrew committed his patch. For gfx1030, we might eventually also enable gfx1030 multilib support; if Richard confirms that collaterally fixes gfx1030, we probably should - and depending on the number/kinds of testsuite, we could then document it or not, I guess.) Tobias amdgcn: config.gcc - enable gfx1100 multilib; add gfx1100 to docs gcc/ChangeLog: * config.gcc (amdgcn-*-*): Add gfx1100 to TM_MULTILIB_CONFIG. * doc/install.texi (Configuration amdgcn-*-*): Mention gfx1100. * doc/invoke.texi (AMD GCN Options): Add gfx1100 to -march/-mtune. libgomp/ChangeLog: * testsuite/libgomp.c/declare-variant-4.h: Add variant functions for gfx1030 and gfx1100. * testsuite/libgomp.c/declare-variant-4-gfx1100.c: New test. Signed-off-by: Tobias Burnus gcc/config.gcc | 2 +- gcc/doc/install.texi | 12 ++++++------ gcc/doc/invoke.texi | 3 +++ libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c | 8 ++++++++ libgomp/testsuite/libgomp.c/declare-variant-4.h | 16 ++++++++++++++++ 5 files changed, 34 insertions(+), 7 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index b2d7d7dd475..2343e98ebe6 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4564,7 +4564,7 @@ case "${target}" in TM_MULTILIB_CONFIG= ;; xdefault | xyes) - TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a" | sed "s/${with_arch},\?//;s/,$//"` + TM_MULTILIB_CONFIG=`echo "gfx900,gfx906,gfx908,gfx90a,gfx1100" | sed "s/${with_arch},\?//;s/,$//"` ;; *) TM_MULTILIB_CONFIG="${with_multilib_list}" diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 71593919389..5304ebd36a9 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1258,12 +1258,12 @@ 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}). 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{gfx900}, @code{gfx906}, @code{gfx908}, @code{gfx90a}, @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. @item arm*-*-* @var{list} is a comma separated list of @code{aprofile} and diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 5f904cf1ef2..d1b2c284e2b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -21723,6 +21723,9 @@ Compile for CDNA1 Instinct MI100 series devices (gfx908). @item gfx90a Compile for CDNA2 Instinct MI200 series devices (gfx90a). +@item gfx1100 +Compile for RDNA3 gfx1100 devices (GFX11 series). + @end table @opindex msram-ecc diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c new file mode 100644 index 00000000000..6ade35224cc --- /dev/null +++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c @@ -0,0 +1,8 @@ +/* { dg-do link { target { offload_target_amdgcn } } } */ +/* { dg-additional-options -foffload=amdgcn-amdhsa } */ +/* { dg-additional-options -foffload=-march=gfx1100 } */ +/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */ + +#include "declare-variant-4.h" + +/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1100 \\(\\);" "optimized" } } */ diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4.h b/libgomp/testsuite/libgomp.c/declare-variant-4.h index a70352430c2..393a5e295cc 100644 --- a/libgomp/testsuite/libgomp.c/declare-variant-4.h +++ b/libgomp/testsuite/libgomp.c/declare-variant-4.h @@ -35,6 +35,20 @@ gfx90a (void) return 0x90a; } +__attribute__ ((noipa)) +int +gfx1030 (void) +{ + return 0x1030; +} + +__attribute__ ((noipa)) +int +gfx1100 (void) +{ + return 0x1100; +} + #ifdef USE_FIJI_FOR_GFX803 #pragma omp declare variant(gfx803) match(device = {isa("fiji")}) #else @@ -44,6 +58,8 @@ gfx90a (void) #pragma omp declare variant(gfx906) match(device = {isa("gfx906")}) #pragma omp declare variant(gfx908) match(device = {isa("gfx908")}) #pragma omp declare variant(gfx90a) match(device = {isa("gfx90a")}) +#pragma omp declare variant(gfx90a) match(device = {isa("gfx1030")}) +#pragma omp declare variant(gfx90a) match(device = {isa("gfx1100")}) __attribute__ ((noipa)) int f (void)