From patchwork Fri Jan 17 18:18:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1224931 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-517612-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=hZ/rUKp8; 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 47zq893P5Gz9sRG for ; Sat, 18 Jan 2020 05:19:03 +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:to :from:subject:cc:message-id:date:mime-version:content-type; q= dns; s=default; b=kbMRpfDpn15o8XHCkNSZTPYHd4U86bntHWSqpcmtJOU3KO pzLXwAHe2Obcj/crXDGcLDgOLu6onC6fCPdtYPd12N46SNzdcoRfG6bjTffbfQGy 8qtG9dp5pmgQqS4VgmrjV0d6UReZmOaLnEGqOs8FTXZolz3NADkYKDcqpFNmo= 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:to :from:subject:cc:message-id:date:mime-version:content-type; s= default; bh=qEeoIdDVk3om9nFHRIrX9MwfUOQ=; b=hZ/rUKp8poxQn+pg+Eoa RQv4mEUExQQleBvfg13u/+dvx8Ke1AeViNTxb2qXR373ZpvaE8GOS7zqD+RWuB4y YNiTgUmEYMdXQQlCnwWNxOsGoD3B7y/l72yZIL5X/lD4QYRBMpjLbkn+eB85QnVD lHCEHmNvGXX7kEIrnpFzg44= Received: (qmail 53072 invoked by alias); 17 Jan 2020 18:18:54 -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 53058 invoked by uid 89); 17 Jan 2020 18:18:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SUBJ_OBFU_PUNCT_FEW, SUBJ_OBFU_PUNCT_MANY autolearn=ham version=3.3.1 spammy= X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Jan 2020 18:18:49 +0000 IronPort-SDR: Rq+dJnxhxT+cqxVVlJMCe0U2y6DNudQ0WyvvouHlhz9MWt07ovp9NIkroaljQgB4ng00cFap1o NdDyRaYc4hYd1CeUteyFaWwkyZ6hLarjo/5r1ypHhaJBNRht0yYTd5k8e2mAfBQ9tsHkCDSfwU yoBY68hz0YDm0JWhDbHy4GBhpS4CtQT4iKBDLC+t0SpwKMM3UiNvD+AK7gkkBZjLc4aj7AvTvN gliMlwgIZHLa+GlXkiLF1CPByatptCRkKa9O4S55qylVagmEsZKCQPnx1EqFGqD9EPBjelTHvp mtI= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 17 Jan 2020 10:18:47 -0800 IronPort-SDR: RHfpS7lVj0zH19Ud+Cs+POHrtZh+xybTB6zZoIEMwzWjSwygzuUWQWFeLM0SeZyMfpOGiDNeaR onTGlyHcGvCg== To: "gcc-patches@gcc.gnu.org" From: Andrew Stubbs Subject: [committed, amdgcn/openacc] Rename acc_device_gcn to acc_device_radeon CC: Thomas Schwinge Message-ID: <1ea0084f-7ae2-c4c0-e1c1-92d36db5f23d@codesourcery.com> Date: Fri, 17 Jan 2020 18:18:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 I've committed this patch, pre-approved by Thomas. It's basically just a search and replace. I had originally invented acc_device_gcn for the device number, but as Thomas pointed out the OpenACC documentation already uses acc_device_radeon for AMD devices. Presumably this is what any existing code will use, if anything, so we ought to be compatible. There's no official release using the "wrong" name, so I don't believe we need to retain that name for any reason. I've tested that there are no regressions. Andrew Rename acc_device_gcn to acc_device_radeon 2020-01-17 Andrew Stubbs libgomp/ * config/accel/openacc.f90 (openacc_kinds): Rename acc_device_gcn to acc_device_radeon. (openacc): Likewise. * openacc.f90 (openacc_kinds): Likewise. (openacc): Likewise. * openacc.h (acc_device_t): Likewise. * openacc_lib.h: Likewise. * testsuite/lib/libgomp.exp (check_effective_target_openacc_amdgcn_accel_present): Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c (cb_compute_construct_end): Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c (cb_enqueue_launch_start): Likewise. * testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c (cb_enter_data_end): Likewise. (cb_exit_data_start): Likewise. (cb_exit_data_end): Likewise. (cb_compute_construct_end): Likewise. (cb_enqueue_launch_start): Likewise. (cb_enqueue_launch_end): Likewise. * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main): Likewise. diff --git a/libgomp/config/accel/openacc.f90 b/libgomp/config/accel/openacc.f90 index b4d40362c5d..a8e5144349e 100644 --- a/libgomp/config/accel/openacc.f90 +++ b/libgomp/config/accel/openacc.f90 @@ -50,7 +50,7 @@ module openacc_kinds ! integer (acc_device_kind), parameter :: acc_device_host_nonshm = 3 removed. integer (acc_device_kind), parameter :: acc_device_not_host = 4 integer (acc_device_kind), parameter :: acc_device_nvidia = 5 - integer (acc_device_kind), parameter :: acc_device_gcn = 8 + integer (acc_device_kind), parameter :: acc_device_radeon = 8 end module openacc_kinds @@ -86,7 +86,7 @@ module openacc ! From openacc_kinds public :: acc_device_kind public :: acc_device_none, acc_device_default, acc_device_host - public :: acc_device_not_host, acc_device_nvidia, acc_device_gcn + public :: acc_device_not_host, acc_device_nvidia, acc_device_radeon public :: acc_on_device diff --git a/libgomp/openacc.f90 b/libgomp/openacc.f90 index 6c92c7c12c9..e2639bf622e 100644 --- a/libgomp/openacc.f90 +++ b/libgomp/openacc.f90 @@ -49,7 +49,7 @@ module openacc_kinds ! integer (acc_device_kind), parameter :: acc_device_host_nonshm = 3 removed. integer (acc_device_kind), parameter :: acc_device_not_host = 4 integer (acc_device_kind), parameter :: acc_device_nvidia = 5 - integer (acc_device_kind), parameter :: acc_device_gcn = 8 + integer (acc_device_kind), parameter :: acc_device_radeon = 8 integer, parameter :: acc_device_property = c_size_t @@ -767,7 +767,7 @@ module openacc ! From openacc_kinds public :: acc_device_kind public :: acc_device_none, acc_device_default, acc_device_host - public :: acc_device_not_host, acc_device_nvidia, acc_device_gcn + public :: acc_device_not_host, acc_device_nvidia, acc_device_radeon public :: acc_device_property public :: acc_property_memory, acc_property_free_memory diff --git a/libgomp/openacc.h b/libgomp/openacc.h index 62b2b0ea559..61736463474 100644 --- a/libgomp/openacc.h +++ b/libgomp/openacc.h @@ -56,7 +56,7 @@ typedef enum acc_device_t { /* acc_device_host_nonshm = 3 removed. */ acc_device_not_host = 4, acc_device_nvidia = 5, - acc_device_gcn = 8, + acc_device_radeon = 8, _ACC_device_hwm, /* Ensure enumeration is layout compatible with int. */ _ACC_highest = __INT_MAX__, diff --git a/libgomp/openacc_lib.h b/libgomp/openacc_lib.h index b327ba76403..717f9b4ef08 100644 --- a/libgomp/openacc_lib.h +++ b/libgomp/openacc_lib.h @@ -44,7 +44,7 @@ ! removed. integer (acc_device_kind), parameter :: acc_device_not_host = 4 integer (acc_device_kind), parameter :: acc_device_nvidia = 5 - integer (acc_device_kind), parameter :: acc_device_gcn = 8 + integer (acc_device_kind), parameter :: acc_device_radeon = 8 integer, parameter :: acc_handle_kind = 4 diff --git a/libgomp/testsuite/lib/libgomp.exp b/libgomp/testsuite/lib/libgomp.exp index f52ed7184e4..7e94527c7ca 100644 --- a/libgomp/testsuite/lib/libgomp.exp +++ b/libgomp/testsuite/lib/libgomp.exp @@ -489,7 +489,7 @@ proc check_effective_target_openacc_amdgcn_accel_present { } { return [check_runtime openacc_amdgcn_accel_present { #include int main () { - return !(acc_get_num_devices (acc_device_gcn) > 0); + return !(acc_get_num_devices (acc_device_radeon) > 0); } } "" ] } diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c index e82a03e8f3c..7d05f482f46 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-init-1.c @@ -224,7 +224,7 @@ static void cb_compute_construct_end (acc_prof_info *prof_info, acc_event_info * if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c index ddf647cda9b..ad33f72e2fb 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-kernels-1.c @@ -106,7 +106,7 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e assert (event_info->launch_event.vector_length >= 1); else if (acc_device_type == acc_device_nvidia) /* ... is special. */ assert (event_info->launch_event.vector_length == 32); - else if (acc_device_type == acc_device_gcn) /* ...and so is this. */ + else if (acc_device_type == acc_device_radeon) /* ...and so is this. */ assert (event_info->launch_event.vector_length == 64); else { @@ -120,7 +120,7 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c index dc7c7582ce2..a5e9ab3f936 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_prof-parallel-1.c @@ -265,7 +265,7 @@ static void cb_enter_data_end (acc_prof_info *prof_info, acc_event_info *event_i if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); @@ -321,7 +321,7 @@ static void cb_exit_data_start (acc_prof_info *prof_info, acc_event_info *event_ if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); @@ -375,7 +375,7 @@ static void cb_exit_data_end (acc_prof_info *prof_info, acc_event_info *event_in if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); @@ -516,7 +516,7 @@ static void cb_compute_construct_end (acc_prof_info *prof_info, acc_event_info * if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); @@ -581,7 +581,7 @@ static void cb_enqueue_launch_start (acc_prof_info *prof_info, acc_event_info *e if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); @@ -647,7 +647,7 @@ static void cb_enqueue_launch_end (acc_prof_info *prof_info, acc_event_info *eve if (acc_device_type == acc_device_host) assert (api_info->device_api == acc_device_api_none); - else if (acc_device_type == acc_device_gcn) + else if (acc_device_type == acc_device_radeon) assert (api_info->device_api == acc_device_api_other); else assert (api_info->device_api == acc_device_api_cuda); diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c index 840052fec12..754e015a280 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c @@ -27,7 +27,7 @@ main () #if defined ACC_DEVICE_TYPE_nvidia d = acc_device_nvidia; #elif defined ACC_DEVICE_TYPE_gcn - d = acc_device_gcn; + d = acc_device_radeon; #elif defined ACC_DEVICE_TYPE_host d = acc_device_host; #else