From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 5A59038930E7 for ; Wed, 29 Apr 2020 09:20:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5A59038930E7 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Thomas_Schwinge@mentor.com IronPort-SDR: NCqNW/IZeMDVWDTpN49nplUVGgfi/EqtmWt5Lp97jA3ZpVHqogQGLUaXw4x9iqNyaHcTbZwSDl FlevPAUTE6Sk1AaDJ6eQq+bbQgaeLHqpx4jZ8qC/BBVlkTPSc33oQo/d6kUJ45LBvo/9C9k73p 5dL99nWu6jEt309V/csTgkn9452VdCI9Z8xaBLdSLjaSEVO7eEI5OP0pJ4SFqrHAm0UIE2hzxE M1FZ/OGkxHqkZxsyeLERqyZmPMSUMTlwk/ln2NaLYEJwHFA4f3UvVEZHclMLgjqjTjqE1+5yKR L5Y= X-IronPort-AV: E=Sophos;i="5.73,331,1583222400"; d="scan'208,223";a="48266953" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 29 Apr 2020 01:20:08 -0800 IronPort-SDR: Z+hqAqa6nCr7FZ2DU1mVYSZuxtGILTNBfo93+lf9RRrocX79moI6IaqQ0O63jjP8OJwcjsrQBo D1eYNxP/nZiaC7KUXFEwbkuFyG8DIAbg6isdR/oSDMdWBxiJj65KzIWoPjlT3PdkpIy8PuRwp5 6cs7r3Rxvke7Ytptj3oPl6JlouW7x4sQLx8v+03309F5PI3+Xo/qs6AgE0Si4LfFLc5cuZX8sn lUrtLjciVdXElmpRQc/rsDsWMOp7LKGTmNxb50f2/VJeRu4JaDQOUaOq7WUF7GmjJeOM9qTBau AIg= From: Thomas Schwinge To: Frederik Harwath , Subject: Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support In-Reply-To: <87v9qfyiyz.fsf@euler.schwinge.homeip.net> References: <20191113153215.17750-1-frederik@codesourcery.com> <87imp01jr3.fsf@euler.schwinge.homeip.net> <20191114153531.7493-1-frederik@codesourcery.com> <87v9qfyiyz.fsf@euler.schwinge.homeip.net> User-Agent: Notmuch/0.29.1+93~g67ed7df (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu) Date: Wed, 29 Apr 2020 11:19:58 +0200 Message-ID: <874kt2bqdd.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-21.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Apr 2020 09:20:23 -0000 --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi! On 2019-12-17T00:00:04+0100, I wrote: > On 2019-11-14T16:35:31+0100, Frederik Harwath = wrote: >> this patch implements OpenACC 2.6 "acc_get_property" and related functio= ns. > As I mentioned before ("thinking aloud"): > > | [...] 'acc_device_current' [is] relevant only for > | 'acc_get_property', to return "the value of the property for the curren= t > | device". This [now has a] special (negative?) value > | [...], so that when additional real device types are added > | later on, we can just add them with increasing numbers, and keep the > | scanning code simple. > Should this actually get value '-1' instead of '-3'? Or, is the OpenACC > 'acc_device_t' code already paying special attention to negative values > '-1', '-2'? (I don't think so.) Now pushed this change to master branch in commit a5d0bc12e1bfa956941cd9c49d5b978256bd11ec "[OpenACC] Set 'acc_device_current =3D -1'", see attached. Gr=C3=BC=C3=9Fe Thomas ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstra=C3=9Fe 201, 80634 M=C3=BCnch= en / Germany Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thomas = Heurung, Alexander Walter --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename="0001-OpenACC-Set-acc_device_current-1.patch" >From a5d0bc12e1bfa956941cd9c49d5b978256bd11ec Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 29 Apr 2020 08:12:36 +0200 Subject: [PATCH] [OpenACC] Set 'acc_device_current = -1' There's no point in using value '-3', and even though not directly related, value '-1' does match 'GOMP_DEVICE_ICV'. libgomp/ * config/accel/openacc.f90 (acc_device_current): Set to '-1'. * openacc.f90 (acc_device_current): Likewise. * openacc.h (acc_device_current): Likewise. * openacc_lib.h (acc_device_current): Likewise. --- libgomp/ChangeLog | 5 +++++ libgomp/config/accel/openacc.f90 | 2 +- libgomp/openacc.f90 | 2 +- libgomp/openacc.h | 2 +- libgomp/openacc_lib.h | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 1a7046f2fc64..b6828adcbe3d 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,5 +1,10 @@ 2020-04-29 Thomas Schwinge + * config/accel/openacc.f90 (acc_device_current): Set to '-1'. + * openacc.f90 (acc_device_current): Likewise. + * openacc.h (acc_device_current): Likewise. + * openacc_lib.h (acc_device_current): Likewise. + PR target/94282 * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Remove 'dg-allow-blank-lines-in-output'. diff --git a/libgomp/config/accel/openacc.f90 b/libgomp/config/accel/openacc.f90 index 275afe43475c..99330733d8f8 100644 --- a/libgomp/config/accel/openacc.f90 +++ b/libgomp/config/accel/openacc.f90 @@ -44,7 +44,7 @@ module openacc_kinds integer, parameter :: acc_device_kind = int32 ! Keep in sync with include/gomp-constants.h. - integer (acc_device_kind), parameter :: acc_device_current = -3 + integer (acc_device_kind), parameter :: acc_device_current = -1 integer (acc_device_kind), parameter :: acc_device_none = 0 integer (acc_device_kind), parameter :: acc_device_default = 1 integer (acc_device_kind), parameter :: acc_device_host = 2 diff --git a/libgomp/openacc.f90 b/libgomp/openacc.f90 index 467fb612c548..111705d0fb60 100644 --- a/libgomp/openacc.f90 +++ b/libgomp/openacc.f90 @@ -41,7 +41,7 @@ module openacc_kinds integer, parameter :: acc_device_kind = int32 ! Keep in sync with include/gomp-constants.h. - integer (acc_device_kind), parameter :: acc_device_current = -3 + integer (acc_device_kind), parameter :: acc_device_current = -1 integer (acc_device_kind), parameter :: acc_device_none = 0 integer (acc_device_kind), parameter :: acc_device_default = 1 integer (acc_device_kind), parameter :: acc_device_host = 2 diff --git a/libgomp/openacc.h b/libgomp/openacc.h index 617364634748..1dc471f62bc7 100644 --- a/libgomp/openacc.h +++ b/libgomp/openacc.h @@ -49,7 +49,7 @@ extern "C" { /* Types */ typedef enum acc_device_t { /* Keep in sync with include/gomp-constants.h. */ - acc_device_current = -3, + acc_device_current = -1, acc_device_none = 0, acc_device_default = 1, acc_device_host = 2, diff --git a/libgomp/openacc_lib.h b/libgomp/openacc_lib.h index ee08e9787cc9..82a3735b1063 100644 --- a/libgomp/openacc_lib.h +++ b/libgomp/openacc_lib.h @@ -37,7 +37,7 @@ integer, parameter :: acc_device_kind = 4 ! Keep in sync with include/gomp-constants.h. - integer (acc_device_kind), parameter :: acc_device_current = -3 + integer (acc_device_kind), parameter :: acc_device_current = -1 integer (acc_device_kind), parameter :: acc_device_none = 0 integer (acc_device_kind), parameter :: acc_device_default = 1 integer (acc_device_kind), parameter :: acc_device_host = 2 -- 2.26.2 --=-=-=--