public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Jakub Jelinek <jakub@redhat.com>, Ilya Verbin <iverbin@gmail.com>
Cc: gcc <gcc-patches@gcc.gnu.org>, <michael.v.zolotukhin@intel.com>,
	<jnorris@codesourcery.com>,
	Kirill Yukhin <kirill.yukhin@gmail.com>
Subject: Re: [gomp4] libgomp: plugin for non-shared memory host execution
Date: Thu, 20 Feb 2014 09:59:00 -0000	[thread overview]
Message-ID: <878ut6rtpe.fsf@schwinge.name> (raw)
In-Reply-To: <20140219175959.GA22862@tucnak.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]

Hi!

On Wed, 19 Feb 2014 18:59:59 +0100, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Feb 19, 2014 at 09:49:20PM +0400, Ilya Verbin wrote:
> > 2014-02-19 20:10 GMT+04:00 Thomas Schwinge <thomas@codesourcery.com>:
> > > Here is such a libgomp plugin plus the infrastructure for initial support
> > > of non-shared memory host execution.  Any comments?
> > 
> > This plugin looks good.

Committed to gomp-4_0-branch as r207938.

Reviewing old emails, I now see in
<http://news.gmane.org/find-root.php?message_id=%3C20130913123614.GB1817%40tucnak.redhat.com%3E>
that Jakub suggested to check that »sizeof (void *) == sizeof
(uintptr_t), etc.«, and then in
<http://news.gmane.org/find-root.php?message_id=%3C20130918090525.GF1817%40tucnak.redhat.com%3E>
to use »uintptr_t instead of void *« and different names for the
functions: »device_alloc (taking size and align arguments, returning
uintptr_t target address), device_free (taking uintptr_t target address
and perhaps size), device_copyto (like memcpy, just with target address
uintptr_t instead of void *) and device_copyfrom (similarly), and
device_run hook or similar (taking host and target fn and target
uintptr_t address of the block with pointers)«.  So, the code should
probably be adjusted for that.


> > I think the function call in GOMP_target also should be replaced with
> > a call to plugin:
> > - fn ((void *) tgt->tgt_start);
> > + devicep->device_run_func (fn, (void *) tgt->tgt_start);

Yes.


> > Also I have a question (not related with this plugin): How will
> > libgomp work with multiple devices of the same type?  Probably it
> > should load the plugin once, query it for the number of available
> > devices, add received number of descriptors to the devices[] array, an
> > then pass devicep->id as an argument to all plugin's interfaces.
> 
> Or the devicep pointer.

To which extent to we want/have to expose non-trivial data types to
plugins, such as a devicep pointer as opposed to (void *) tgt->tgt_start?


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

  reply	other threads:[~2014-02-20  9:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87zjpehpz4.fsf@schwinge.name>
     [not found] ` <20131108154000.GP27813@tucnak.zalov.cz>
     [not found]   ` <87lhzqs3tv.fsf@kepler.schwinge.homeip.net>
2014-02-19 16:10     ` [gomp4] libgomp: plugin for non-shared memory host execution (was: libgomp.c/target-1.c failing in fn2's GOMP_target_update) Thomas Schwinge
2014-02-19 17:49       ` Ilya Verbin
2014-02-19 18:07         ` Jakub Jelinek
2014-02-20  9:59           ` Thomas Schwinge [this message]
2014-02-20 11:09       ` [gomp4] libgomp: plugin for non-shared memory host execution Thomas Schwinge
2015-07-30 12:26       ` Thomas Schwinge
2015-07-30 12:31         ` Jakub Jelinek
2015-07-31 15:40           ` Thomas Schwinge
2015-08-10 16:51             ` 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=878ut6rtpe.fsf@schwinge.name \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iverbin@gmail.com \
    --cc=jakub@redhat.com \
    --cc=jnorris@codesourcery.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=michael.v.zolotukhin@intel.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).