From: Thomas Schwinge <thomas@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, Jakub Jelinek <jakub@redhat.com>
Cc: Julian Brown <julian@codesourcery.com>
Subject: Re: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)
Date: Mon, 22 Dec 2014 17:55:00 -0000 [thread overview]
Message-ID: <871tnrzio8.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <20141111135323.29e0f27b@octopus>
[-- Attachment #1: Type: text/plain, Size: 6408 bytes --]
Hi!
On Tue, 11 Nov 2014 13:53:23 +0000, Julian Brown <julian@codesourcery.com> wrote:
> On Tue, 23 Sep 2014 19:19:31 +0100
> Julian Brown <julian@codesourcery.com> wrote:
>
> > This patch contains the bulk of the OpenACC 2.0 runtime support,
> > building around, or on top of, the OpenMP 4.0 support (as previously
> > posted or already extant upstream) where we could. [...]
>
> Here is a new version of the OpenACC support patch for libgomp, rebased
> on top of a version of Ilya Verbin's patches that I merged to a local
> clone of trunk, and tested as far as possible without the
> middle/front-end pieces, since those are not ready yet.
> --- a/libgomp/target.c
> +++ b/libgomp/target.c
Code is split off of gomp_init_device into the new gomp_init_tables:
> gomp_init_device (struct gomp_device_descr *devicep)
> {
> + /* Initialize the target device. */
> devicep->init_device_func (devicep->target_id);
> +
> + devicep->is_initialized = true;
> +}
>
> +attribute_hidden void
> +gomp_init_tables (const struct gomp_device_descr *devicep,
> + struct gomp_memory_mapping *mm)
> +{
> /* Get address mapping table for device. */
> struct mapping_table *table = NULL;
> [...]
..., and a new function gomp_init_dev_tables added to call both of them:
> +static void
> +gomp_init_dev_tables (struct gomp_device_descr *devicep)
> +{
> + gomp_init_device (devicep);
> + gomp_init_tables (devicep, &devicep->mem_map);
> +}
..., which is then used in GOMP_target:
> @@ -673,7 +753,12 @@ GOMP_target (int device, void (*fn) (void *), const void *openmp_target,
> + if (devicep != NULL && !devicep->is_initialized)
> + gomp_init_dev_tables (devicep);
..., and GOMP_target_data:
> @@ -724,7 +818,12 @@ GOMP_target_data (int device, const void *openmp_target, size_t mapnum,
> + if (devicep != NULL && !devicep->is_initialized)
> + gomp_init_dev_tables (devicep);
..., but not in GOMP_target_update:
> @@ -771,15 +871,18 @@ GOMP_target_update (int device, const void *openmp_target, size_t mapnum,
> + if (devicep != NULL && !devicep->is_initialized)
> gomp_init_device (devicep);
Committed to gomp-4_0-branch in r219023:
commit 0020b7972a6f7f422bd9d4782021ff5b8e2b0f50
Author: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon Dec 22 17:40:37 2014 +0000
libgomp: Restore code that initializes the address mapping tables in GOMP_target_update.
libgomp/
* target.c (GOMP_target_update): To initialize, call
gomp_init_dev_tables instead of gomp_init_device.
With Intel MIC offloading (emulation), this fixes cases of "#pragma omp declare
target" of variables, followed by "#pragma omp target update to([...])" before
any "#pragma omp target" or "#pragma omp target data" is called:
FAIL: libgomp.c/examples-4/e.53.3.c execution test
FAIL: libgomp.c/examples-4/e.53.4.c execution test
FAIL: libgomp.c/examples-4/e.53.5.c execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O0 execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O1 execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O2 execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O3 -fomit-frame-pointer execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -O3 -g execution test
FAIL: libgomp.fortran/examples-4/e.53.3.f90 -Os execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O0 execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O1 execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O2 execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O3 -fomit-frame-pointer execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -O3 -g execution test
FAIL: libgomp.fortran/examples-4/e.53.4.f90 -Os execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O0 execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O1 execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O2 execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O3 -fomit-frame-pointer execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O3 -fomit-frame-pointer -funroll-loops execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -O3 -g execution test
FAIL: libgomp.fortran/examples-4/e.53.5.f90 -Os execution test
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@219023 138bc75d-0d04-0410-961f-82ee72b054a4
---
libgomp/ChangeLog.gomp | 3 +++
libgomp/target.c | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp
index 26fdfe6..3aa9bf4 100644
--- libgomp/ChangeLog.gomp
+++ libgomp/ChangeLog.gomp
@@ -1,5 +1,8 @@
2014-12-22 Thomas Schwinge <thomas@codesourcery.com>
+ * target.c (GOMP_target_update): To initialize, call
+ gomp_init_dev_tables instead of gomp_init_device.
+
* target.c (gomp_map_vars) <GOMP_MAP_TO_PSET>: Revert earlier
changes.
diff --git libgomp/target.c libgomp/target.c
index 423bbee..8517a84 100644
--- libgomp/target.c
+++ libgomp/target.c
@@ -891,7 +891,7 @@ GOMP_target_update (int device, const void *offload_table, size_t mapnum,
struct gomp_memory_mapping *mm = &devicep->mem_map;
gomp_mutex_lock (&mm->lock);
if (!devicep->is_initialized)
- gomp_init_device (devicep);
+ gomp_init_dev_tables (devicep);
gomp_mutex_unlock (&mm->lock);
if (!(devicep->capabilities & GOMP_OFFLOAD_CAP_OPENMP_400))
Grüße,
Thomas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]
next prev parent reply other threads:[~2014-12-22 17:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 18:20 [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin Julian Brown
2014-11-11 13:54 ` [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost) Julian Brown
2014-11-12 10:10 ` Jakub Jelinek
2014-11-12 10:59 ` Thomas Schwinge
2014-11-12 21:11 ` Mike Stump
2014-11-12 11:06 ` Julian Brown
2014-11-12 11:15 ` Jakub Jelinek
2014-11-12 11:33 ` libgomp: "GNU OpenMP Runtime Library" (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-12 11:49 ` Jakub Jelinek
2014-11-12 13:40 ` David Malcolm
2014-11-12 13:49 ` Jakub Jelinek
2014-11-12 20:30 ` David Malcolm
2014-11-12 20:41 ` Jakub Jelinek
2014-11-12 20:50 ` David Malcolm
2015-01-11 2:18 ` libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: "GNU OpenMP Runtime Library") Thomas Schwinge
2015-01-29 10:25 ` Thomas Schwinge
2019-05-28 21:27 ` libgomp: long known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: Now known as the GNU Offloading and Multi Processing Runtime Library (was: libgomp: "GNU OpenMP Runtime Library")) Thomas Schwinge
[not found] ` <20141113232615.4ff373bf@octopus>
2014-11-14 16:07 ` Fortran/C interfacing (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-14 21:01 ` Fortran/C interfacing Tobias Burnus
2014-11-14 21:24 ` Jakub Jelinek
2014-11-14 16:38 ` GOMP_DEBUG environment variable? (was: [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost)) Thomas Schwinge
2014-11-15 1:04 ` [PATCH 1/5] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin (repost) Julian Brown
2014-11-19 19:58 ` Bernd Schmidt
2014-11-19 20:39 ` Cesar Philippidis
2014-12-22 17:55 ` Thomas Schwinge [this message]
2014-12-22 18:05 ` Thomas Schwinge
2014-12-22 18:12 ` Thomas Schwinge
2014-12-22 18:16 ` Thomas Schwinge
2014-12-22 18:55 ` Thomas Schwinge
2014-12-23 0:57 ` Thomas Schwinge
2014-12-22 16:41 ` [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin Thomas Schwinge
2015-01-12 14:49 ` Thomas Schwinge
2015-01-12 15:07 ` Thomas Schwinge
2015-01-12 15:00 ` Thomas Schwinge
2017-02-02 14:38 ` libgomp, nvptx plugin: Make "nvptx_exec" static (was: [PATCH 7/10] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin) Thomas Schwinge
2022-05-12 11:32 ` libgomp plugins: Don't 'AC_SUBST' and 'AC_DEFINE_UNQUOTED' for 'PLUGIN_GCN', 'PLUGIN_NVPTX' " Thomas Schwinge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tnrzio8.fsf@kepler.schwinge.homeip.net \
--to=thomas@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=julian@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).