public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Jeff Law <law@redhat.com>
Cc: Cesar Philippidis <cesar@codesourcery.com>,
	Andrew MacLeod	<amacleod@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	Jakub Jelinek	<jakub@redhat.com>,
	Nathan Sidwell <nathan@codesourcery.com>,
	Ilya Verbin	<iverbin@gmail.com>,
	Kirill Yukhin <kirill.yukhin@gmail.com>
Subject: Offload configurations (was: [patch] New backend header reduction)
Date: Mon, 02 Nov 2015 08:43:00 -0000	[thread overview]
Message-ID: <874mh43i7q.fsf@kepler.schwinge.homeip.net> (raw)
In-Reply-To: <5633E1AE.1010208@redhat.com>

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

Hi!

On Fri, 30 Oct 2015 15:31:26 -0600, Jeff Law <law@redhat.com> wrote:
> On 10/30/2015 02:23 PM, Cesar Philippidis wrote:
> > On 10/30/2015 01:20 PM, Andrew MacLeod wrote:
> >> On 10/30/2015 02:09 PM, Andrew MacLeod wrote:
> >>> On 10/30/2015 01:56 PM, Cesar Philippidis wrote:
> >>>> On 10/23/2015 12:24 PM, Jeff Law wrote:
> >>>>> On 10/23/2015 10:53 AM, Andrew MacLeod wrote:
> >>>>>
> >>>> There's a little bit of fallout with this patch when building an
> >>>> offloaded compiler for openacc. It looks like cgraph.c needs to include
> >>>> context.h and varpool.c needs context.h and omp-low.h. There's a couple
> >>>> of ifdef ENABLE_OFFLOADING which may have gone undetected with your
> >>>> script.
> >>> If they are defined on the command line or some other way I couldn't
> >>> see with the targets I built, then that is the common case when that
> >>> happens.  I don't think I did any openacc builds.     OR maybe I need
> >>> to add nvptx to my coverage builds. Perhaps that is best.
> >>>> I've bootstrapped the attached patch for an nvptx/x86_64-linux target.
> >>>> I'm still testing that toolchain. If the testing comes back clean, is
> >>>> this patch OK for trunk?
> >> Ah, I see.  there is no nvptx target in config-list.mk, so it never got
> >> covered.

(Now there is, but that's not actually the problem here.)

> > Yeah, you need to build two separate compilers. Thomas posted some
> > directions here <https://gcc.gnu.org/wiki/Offloading>. You could
> > probably reproduce it with openmp and Intel's MIC emulation target too.
> Oh, there's something specific to the offloading support that needs 
> context.h, it's not the ptx port.  Duh.  Anyway, it'd still be good to 
> get standard builds of the nvptx backend into config-list.mk.
> 
> Not sure how painful it'd be to add the offloading path.

Shouldn't actually be difficult: you ought (untested) to be able to
configure with, for example,
--enable-offload-targets=nvptx-none,x86_64-intelmicemul-linux-gnu even if
not actually having built these offloading compilers.  (Due to a
"strange" requirement of Intel MIC offloading configuration, that "the
GCC build reference[s]/depend[s] on the Intel MIC offloading compiler's
installation directory (which [thus has to be] built and installed
earlier)",
<http://news.gmane.org/find-root.php?message_id=%3C878uaq68fn.fsf%40kepler.schwinge.homeip.net%3E>,
this would fail later on, but as config-list.mk testing only builds the
"all-gcc" target, that's not a problem.)

So, maybe add to config-list.mk one x86_64-linux-gnu target with
--enable-offload-targets=[...] to cover code guarded by the
ENABLE_OFFLOADING preprocessor conditional.  And, maybe add one
nvptx-none or x86_64-intelmic-linux-gnu target with
--enable-as-accelerator-for=[something] to cover code guarded by the
ACCEL_COMPILER preprocessor conditional.

> This is a great example of why we're trying to minimize/eliminate 
> conditional compilation :-)

Agreed.  For the longer term, I think we should get rid of the (only)
handful of ENABLE_OFFLOADING and ACCEL_COMPILER preprocessor
conditionals.  For the former we'll have to find something, but the
latter could just be replaced with "if (flag_offload_abi !=
OFFLOAD_ABI_UNSET)" or similar, I think.


Grüße
 Thomas

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

  reply	other threads:[~2015-11-02  8:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 16:57 [patch] New backend header reduction Andrew MacLeod
2015-10-23 19:25 ` Jeff Law
2015-10-30 18:03   ` Cesar Philippidis
2015-10-30 18:29     ` Andrew MacLeod
2015-10-30 20:24       ` Andrew MacLeod
2015-10-30 20:27         ` Cesar Philippidis
2015-10-30 20:52           ` Jeff Law
2015-10-30 20:54           ` cgraph offloading error? Nathan Sidwell
2015-10-30 21:04             ` Jeff Law
2015-10-30 21:22               ` Nathan Sidwell
2015-10-30 21:31                 ` Jeff Law
2015-10-30 22:17                   ` Nathan Sidwell
2015-10-30 22:31                     ` Nathan Sidwell
2015-10-30 22:33                     ` Jeff Law
2015-10-30 23:01                       ` Nathan Sidwell
2015-10-30 22:16           ` [patch] New backend header reduction Jeff Law
2015-11-02  8:43             ` Thomas Schwinge [this message]
2015-10-30 13:38 ` [patch] New 'all' front end " Andrew MacLeod
2015-10-30 16:20   ` Mike Stump
2015-10-30 16:35     ` Andrew MacLeod
2015-10-30 16:39       ` Mike Stump
2015-11-02  6:41   ` Jeff Law
2015-11-02 13:58     ` [patch] New remainder of " Andrew MacLeod
2015-11-09 21:33       ` Jeff Law
2015-10-31  7:02 ` [patch] New backend " Andreas Schwab
2015-10-31  8:14   ` Markus Trippelsdorf
2015-10-31 15:24     ` Markus Trippelsdorf
2015-10-31 20:30   ` Jeff Law
2015-11-02  7:43 ` Thomas Schwinge
2015-11-02 13:51   ` Andrew MacLeod

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=874mh43i7q.fsf@kepler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=amacleod@redhat.com \
    --cc=cesar@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iverbin@gmail.com \
    --cc=jakub@redhat.com \
    --cc=kirill.yukhin@gmail.com \
    --cc=law@redhat.com \
    --cc=nathan@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).