From patchwork Mon Feb 3 17:34:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1232933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-518785-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=nox6Lhh9; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48BFM82t8yz9sPK for ; Tue, 4 Feb 2020 04:34:44 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=gszDBUFi468Xb7G96rNuleJhZGqE01r0gmTqijrvZCom0erjivV45 Sn8eoY/u1XObg33aKFk3wNaG3uEIS/BUhDGcKm+gyLjTwKZ5ehZ0LGVaiS5d+XV4 j9IeQLxxwP3bEHcyioT85XzZ5nQNdlWL9kntpzhKMcFMd/r5AUfn04= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=Va7O04QUg61xJsYYaYTaN7b77HU=; b=nox6Lhh9liq3zs5GWEbL baHkfKeJikA7O2XhVcWmi3jQn1461cyorwh4HLEQePWt00SSTpcIFThwAz4oPv8Z 4lhZbdJr6e3QlnK6e7vj1Ir6f1/uTQCo7uJL1zHUqQPCOe7TVLrEIm0bbG0e7v2c wwsNwatfgh5X1+m9uafn8cU= Received: (qmail 90541 invoked by alias); 3 Feb 2020 17:34:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 90532 invoked by uid 89); 3 Feb 2020 17:34:36 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, SPF_PASS autolearn=ham version=3.3.1 spammy=16428, inherited, volunteers, mtune X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Feb 2020 17:34:34 +0000 IronPort-SDR: W+cZyfwYBtdxz/ygfcWwyqBbFnrr3QoLQYTUzVvKLxQrtOHQvCih+/b1IkiX8rfAZeM/ZFJxEg QQQjjIea13ZjkWAKkf4tmfDCtpehv6Ex1JCEoI7akxaUjcD+4RoaBaopASILwEyFkHVLDpIQFi qKRuu4LbvLyNGjRhzdjTqt5xc8oVy3g/145k618oeb1K7wAAzVLK6Cwa/x1Q99uwyR26Qvs4ko tZYRwzgfCMnbkJItM/usmZw69S2OyPVcDId/Lc8uGFMPkxMsRU2oONoHXttBXxcqstSswrt/zP XfY= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 03 Feb 2020 09:34:32 -0800 IronPort-SDR: 4h+1LNdMd0oxWjkHPdERkGCNDHHKDQe3S97cuUdJsOS/EYnshdEtChRx8A5mS+Ywu5cc9G6s3p 0e7tV4H8d7Vg== From: Andrew Stubbs Subject: [committed, amdgcn] Remove gfx801 "carrizo" support To: "gcc-patches@gcc.gnu.org" Message-ID: Date: Mon, 3 Feb 2020 17:34:27 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 This patch removes the -march=carrizo option and all the gfx801 related bits. The Carrizo options were inherited from the original GCN port, but they've not been tested since (we don't have the hardware), and there's no XNACK handling, so it probably wouldn't work reliably. Additionally, libgomp is configured for discrete GPUs with independent memory; Carrizo would prefer shared memory. Since this will be the first GCC release with GCN offloading there are no backward compatibility issues to consider (even if it weren't broken). The option can be added back if and when somebody volunteers to fix and maintain it. Andrew Remove gfx801 "carrizo" support 2020-02-03 Andrew Stubbs gcc/ * config.gcc: Remove "carrizo" support. * config/gcn/gcn-opts.h (processor_type): Likewise. * config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): Likewise. * config/gcn/gcn.opt (gpu_type): Likewise. * config/gcn/t-omp-device: Likewise. libgomp/ * plugin/plugin-gcn.c (EF_AMDGPU_MACH_AMDGCN_GFX801): Remove. (gcn_gfx801_s): Remove. (isa_hsa_name): Remove gfx801. (isa_gcc_name): Remove gfx801/carizzo. (isa_code): Remove gfx801. diff --git a/gcc/config.gcc b/gcc/config.gcc index 5532a7be6ac..ae5a845fcce 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4404,7 +4404,7 @@ case "${target}" in for which in arch tune; do eval "val=\$with_$which" case ${val} in - "" | carrizo | fiji | gfx900 | gfx906 ) + "" | fiji | gfx900 | gfx906 ) # OK ;; *) diff --git a/gcc/config/gcn/gcn-opts.h b/gcc/config/gcn/gcn-opts.h index aac06e3484e..385d2be8675 100644 --- a/gcc/config/gcn/gcn-opts.h +++ b/gcc/config/gcn/gcn-opts.h @@ -20,7 +20,6 @@ /* Which processor to generate code or schedule for. */ enum processor_type { - PROCESSOR_CARRIZO, PROCESSOR_FIJI, PROCESSOR_VEGA }; diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index 16c3aa2567e..5bcad7d1d41 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -2571,8 +2571,6 @@ gcn_omp_device_kind_arch_isa (enum omp_device_kind_arch_isa trait, case omp_device_arch: return strcmp (name, "gcn") == 0; case omp_device_isa: - if (strcmp (name, "carrizo") == 0) - return gcn_arch == PROCESSOR_CARRIZO; if (strcmp (name, "fiji") == 0) return gcn_arch == PROCESSOR_FIJI; if (strcmp (name, "gfx900") == 0) diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt index 3b3d441ded9..04c73d64630 100644 --- a/gcc/config/gcn/gcn.opt +++ b/gcc/config/gcn/gcn.opt @@ -25,9 +25,6 @@ Enum Name(gpu_type) Type(enum processor_type) GCN GPU type to use: -EnumValue -Enum(gpu_type) String(carrizo) Value(PROCESSOR_CARRIZO) - EnumValue Enum(gpu_type) String(fiji) Value(PROCESSOR_FIJI) @@ -38,11 +35,11 @@ EnumValue Enum(gpu_type) String(gfx906) Value(PROCESSOR_VEGA) march= -Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_CARRIZO) +Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_FIJI) Specify the name of the target GPU. mtune= -Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_tune) Init(PROCESSOR_CARRIZO) +Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_tune) Init(PROCESSOR_FIJI) Specify the name of the target GPU. m32 diff --git a/gcc/config/gcn/t-omp-device b/gcc/config/gcn/t-omp-device index 288f7f065cb..d9809d5f455 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.c echo kind: gpu > $@ echo arch: gcn >> $@ - echo isa: carrizo fiji gfx900 gfx906 >> $@ + echo isa: fiji gfx900 gfx906 >> $@ diff --git a/libgomp/plugin/plugin-gcn.c b/libgomp/plugin/plugin-gcn.c index 25547ef12e8..dc72c90962c 100644 --- a/libgomp/plugin/plugin-gcn.c +++ b/libgomp/plugin/plugin-gcn.c @@ -403,7 +403,6 @@ struct gcn_image_desc See https://llvm.org/docs/AMDGPUUsage.html#amdgpu-ef-amdgpu-mach-table */ typedef enum { - EF_AMDGPU_MACH_AMDGCN_GFX801 = 0x028, EF_AMDGPU_MACH_AMDGCN_GFX803 = 0x02a, EF_AMDGPU_MACH_AMDGCN_GFX900 = 0x02c, EF_AMDGPU_MACH_AMDGCN_GFX906 = 0x02f, @@ -1629,7 +1628,6 @@ elf_gcn_isa_field (Elf64_Ehdr *image) return image->e_flags & EF_AMDGPU_MACH_MASK; } -const static char *gcn_gfx801_s = "gfx801"; const static char *gcn_gfx803_s = "gfx803"; const static char *gcn_gfx900_s = "gfx900"; const static char *gcn_gfx906_s = "gfx906"; @@ -1642,8 +1640,6 @@ static const char* isa_hsa_name (int isa) { switch(isa) { - case EF_AMDGPU_MACH_AMDGCN_GFX801: - return gcn_gfx801_s; case EF_AMDGPU_MACH_AMDGCN_GFX803: return gcn_gfx803_s; case EF_AMDGPU_MACH_AMDGCN_GFX900: @@ -1662,8 +1658,6 @@ static const char* isa_gcc_name (int isa) { switch(isa) { - case EF_AMDGPU_MACH_AMDGCN_GFX801: - return "carrizo"; case EF_AMDGPU_MACH_AMDGCN_GFX803: return "fiji"; default: @@ -1676,9 +1670,6 @@ isa_gcc_name (int isa) { static gcn_isa isa_code(const char *isa) { - if (!strncmp (isa, gcn_gfx801_s, gcn_isa_name_len)) - return EF_AMDGPU_MACH_AMDGCN_GFX801; - if (!strncmp (isa, gcn_gfx803_s, gcn_isa_name_len)) return EF_AMDGPU_MACH_AMDGCN_GFX803;