public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilya Verbin <iverbin@gmail.com>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>,
	Bernd Schmidt <bernds@codesourcery.com>,
		Richard Biener <rguenther@suse.de>,
	Kirill Yukhin <kirill.yukhin@gmail.com>,
		Andrey Turetskiy <andrey.turetskiy@gmail.com>,
	gcc <gcc-patches@gcc.gnu.org>,
		Joseph Myers <joseph@codesourcery.com>
Subject: Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling
Date: Mon, 21 Sep 2015 16:59:00 -0000	[thread overview]
Message-ID: <CADG=Z0GuUyeG0mB6qz=ZSzdGHO_dgqFfWh=wOnRRDY_yeavk8Q@mail.gmail.com> (raw)
In-Reply-To: <87y4fzztub.fsf@kepler.schwinge.homeip.net>

2015-09-21 18:15 GMT+03:00 Thomas Schwinge <thomas@codesourcery.com>:
> (<https://gcc.gnu.org/PR67300>, "--foffload* undocumented", has recently
> been filed.)
>
> (In the following, "intelmic" is short for
> "x86_64-intelmicemul-linux-gnu", and "nvptx" is short for "nvptx-none".)
>
> What is the syntax to use for building both intelmic and nvptx offloading
> code?  I understand we allow for separate -foffload=intelmic
> -foffload=nvptx options.  Do we also intend to allow
> -foffload=intelmic,nvptx or -foffload=intelmic:nvptx?
>
> And then, we allow for specifying offloading compiler options with
> -foffload=intelmic=[...] and -foffload=nvptx=[...]; do we also intend to
> allow -foffload=intelmic,nvptx=[...] (do the options apply to nvptx only,
> or to both intelmic and nvptx?), and/or
> -foffload=intelmic=[...],nvptx=[...], and/or
> -foffload=intelmic:nvptx=[...] (which "looks a bit like" the options
> ought to apply to nvptx only -- or to both intelmic and nvptx?), and/or
> -foffload=intelmic=[...]:nvptx=[...]?

The plan was:

1. -foffload=intelmic,nvptx=[...]  <- apply options to both intelmic,nvptx.
   Just like -foffload=[...] applies to both targets (if configured so).
2. -foffload=intelmic=[...],nvptx=[...]  <- is not allowed.
3. To apply different options to different targets, one should pass:
   -foffload=intelmic=[...] -foffload=nvptx=[...].

>       3612        /* Check that GCC is configured to support the offload target.  */
>       3613        c = OFFLOAD_TARGETS;
>       3614        while (c)
>       3615          {
>       3616            n = strchr (c, ',');
>       3617            if (n == NULL)
>       3618              n = strchr (c, '\0');
>       3619
>       3620            if (next - cur == n - c && strncmp (target, c, n - c) == 0)
>       3621              break;
>       3622
>       3623            c = *n ? n + 1 : NULL;
>       3624          }
>       3625
>       3626        if (!c)
>       3627          fatal_error (input_location,
>       3628                       "GCC is not configured to support %s as offload target",
>       3629                       target);
>
> So, this code will not do the right thing when configured with
> --enable-offload-targets=intelmic,nvptx (thus,
> OFFLOAD_TARGETS=intelmic:nvptx): using -foffload=nvptx will then result
> in "xgcc: fatal error: GCC is not configured to support nvptx as offload
> target".
>
> If I'm understanding the following code correctly, this supports the idea
> that the intention has been for -foffload=[targets]=[options] to separate
> the targets by commas, and separate the options by spaces -- is that
> correct?

Yes, targets are separated by commas, options are the whole string after the
equal sign, spaces inside are allowed.

  -- Ilya

  reply	other threads:[~2015-09-21 16:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 14:59 Ilya Verbin
2014-10-13 10:27 ` Jakub Jelinek
2014-10-13 10:36   ` Ilya Verbin
2014-10-13 15:08     ` Bernd Schmidt
2014-10-14  7:31       ` Richard Biener
2014-10-14 12:58         ` Bernd Schmidt
2014-10-15 14:12           ` Richard Biener
2014-10-27 10:59             ` Bernd Schmidt
2015-02-18 17:04     ` Thomas Schwinge
2015-02-19  9:28       ` Thomas Schwinge
2015-03-10 12:37         ` Thomas Schwinge
2015-04-27 16:08           ` Thomas Schwinge
2015-04-28 13:39             ` Bernd Schmidt
2015-04-29 16:41               ` Thomas Schwinge
2015-07-14 20:10                 ` Thomas Schwinge
2015-07-14 20:15                   ` Richard Biener
2014-10-24 18:33   ` Ilya Verbin
2014-10-24 18:41     ` Jakub Jelinek
2014-10-27 12:06       ` Ilya Verbin
2014-11-28  1:45 ` Ilya Verbin
2014-11-28  9:32   ` Richard Biener
2014-12-07 23:55     ` Ilya Verbin
2014-12-09 14:06       ` Richard Biener
2014-12-09 22:48         ` Ilya Verbin
2015-11-20 19:34           ` Ilya Verbin
2015-11-23 11:09             ` Richard Biener
2015-09-21 15:51 ` Thomas Schwinge
2015-09-21 16:59   ` Ilya Verbin [this message]
2015-09-22 12:20     ` Thomas Schwinge
2015-09-22 23:03       ` Bernd Schmidt
2015-09-23 15:19         ` 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='CADG=Z0GuUyeG0mB6qz=ZSzdGHO_dgqFfWh=wOnRRDY_yeavk8Q@mail.gmail.com' \
    --to=iverbin@gmail.com \
    --cc=andrey.turetskiy@gmail.com \
    --cc=bernds@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=rguenther@suse.de \
    --cc=thomas@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).