From patchwork Thu Dec 18 12:24:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 422563 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AA6A81400F1 for ; Thu, 18 Dec 2014 23:24:46 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=q3f8g2NxGFw3x1ur OW8s1IXLGzruKVTSvs8eVwVcNpST137e9soXOyda+trGc3EjuiCvTrK5fqf4Q4P1 vBxRejb6IdXKopv1QSMMmnAha+oU8x4E7X+pGZEUcvIPnEbpsUIqDFrRqqsjEdaf 9+5tkh2Xx3zXXIT+DrqqXEznquQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=zVKtGQNO5aRQlt+WpMBwhJ gmBVY=; b=xQML2fBBdrbUOgefi/sszk5sCO5bnx3IpSHXYR+QyuCXyFvtCFfhDr LTCfOl+mvXldoue7yOqEHrd1q7TwamX9QXyOQ+EWEsEAdma80LLPfIBltG/Y8auX 9yWc/1kcg0H2LNm2fIA+IzCg3ZG3n7lq94aN/pNoOp2Lz2er3h7Fc= Received: (qmail 31092 invoked by alias); 18 Dec 2014 12:24:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31079 invoked by uid 89); 18 Dec 2014 12:24:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Dec 2014 12:24:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Y1a87-0001GS-1O from Thomas_Schwinge@mentor.com ; Thu, 18 Dec 2014 04:24:31 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.181.6; Thu, 18 Dec 2014 12:24:29 +0000 From: Thomas Schwinge To: Jakub Jelinek CC: Subject: Re: OpenACC middle end changes In-Reply-To: <20141218121538.GH1667@tucnak.redhat.com> References: <87fvdnnijk.fsf@schwinge.name> <20141113180949.GX5026@tucnak.redhat.com> <87r3vxrzca.fsf@schwinge.name> <20141218113853.GE1667@tucnak.redhat.com> <20141218120222.GF1667@tucnak.redhat.com> <20141218121538.GH1667@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 18 Dec 2014 13:24:20 +0100 Message-ID: <87mw6lrvrf.fsf@schwinge.name> MIME-Version: 1.0 Hi Jakub! On Thu, 18 Dec 2014 13:15:38 +0100, Jakub Jelinek wrote: > On Thu, Dec 18, 2014 at 01:02:22PM +0100, Jakub Jelinek wrote: > > On Thu, Dec 18, 2014 at 12:38:53PM +0100, Jakub Jelinek wrote: > > > So, is what is on the gomp-4_0-branch now all that you'd like to merge to > > > trunk now? Basically, yes. Only "basically", because there are still a few unaddressed review issues in the front ends -- which I'll look into now. (Meaning really: now.) :-) Doing the "merge" as one big commit on trunk will be the easiest approach, of course. Is that OK, or is there any requirement to single out any of the changes, such as the libgomp/testsuite/libgomp-test-support.exp file just discussed, or the libgomp »Offloading and Multi Processing Runtime Library« renaming, or anything else? > > > Has it been tested on nvptx? I have always been testing on gomp-4_0-branch with ACC_DEVICE_TYPE=host and ACC_DEVICE_TYPE=host_nonshm, plus with ACC_DEVICE_TYPE=nvidia in an internal branch. This branch corresponds to gomp-4_0-branch, but also includes a few patches related to offloading that Bernd has posted for trunk approval, but has not yet gotten approved. > > > I guess we should test it with > > > XeonPhi offloading too to make sure it doesn't break. Right. Do you happen to be set up for such testing? I have not yet managed to properly change my build/test scripts for x86_64-intelmicemul-linux-gnu. > > > And then you or together with your coworkers should write the summary > > > ChangeLogs (i.e. what changed compared to trunk in a single giant entry > > > for each ChangeLog file as opposed to many ChangeLog.gomp change entries). Right, I'll do that once it's time to merge -- otherwise it'll be too cumbersome to keep those up to date. > > Also, it would be nice to update wiki/Offloading to give details on all the > > steps how to configure nvptx offloading (how to grab nvptx-newlib, > > nvptx-tools, how to configure nvptx-none compiler, in what order to build > > those etc.). Right. > FYI, just tried to build gomp-4_0-branch with: > ../configure --build=x86_64-intelmicemul-linux-gnu --host=x86_64-intelmicemul-linux-gnu --target=x86_64-intelmicemul-linux-gnu --enable-as-accelerator-for=x86_64-pc-linux-gnu --disable-bootstrap > make -j16 > and the build failed with: > ../../gcc/builtins.c: In function ‘rtx_def* expand_builtin_acc_on_device(tree, rtx)’: > ../../gcc/builtins.c:5904:17: error: ‘ACCEL_COMPILER_acc_device’ was not declared in this scope > v2 = GEN_INT (ACCEL_COMPILER_acc_device); > ^ > ../../gcc/rtl.h:3186:51: note: in definition of macro ‘GEN_INT’ > #define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N)) > ^ > > Where is ACCEL_COMPILER_acc_device macro supposed to be defined? From b6781092de7cc9fc8c24600815e0a1223e1241f5 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Wed, 17 Dec 2014 10:10:53 +0100 Subject: [PATCH] Intel MIC offloading. --- gcc/config.gcc | 1 + gcc/config/i386/intelmic-offload.h | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 gcc/config/i386/intelmic-offload.h diff --git gcc/config.gcc gcc/config.gcc index 8541274..faad47d 100644 --- gcc/config.gcc +++ gcc/config.gcc @@ -2906,6 +2906,7 @@ esac case ${target} in *-intelmic-* | *-intelmicemul-*) tmake_file="${tmake_file} i386/t-intelmic" + tm_file="${tm_file} i386/intelmic-offload.h" ;; esac diff --git gcc/config/i386/intelmic-offload.h gcc/config/i386/intelmic-offload.h new file mode 100644 index 0000000..dc346c7 --- /dev/null +++ gcc/config/i386/intelmic-offload.h @@ -0,0 +1,35 @@ +/* Definitions for Intel MIC offloading. + + Copyright (C) 2014 Free Software Foundation, Inc. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3, or (at your option) + any later version. + + GCC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + Under Section 7 of GPL version 3, you are granted additional + permissions described in the GCC Runtime Library Exception, version + 3.1, as published by the Free Software Foundation. + + You should have received a copy of the GNU General Public License and + a copy of the GCC Runtime Library Exception along with this program; + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +#ifndef INTELMIC_OFFLOAD_H +#define INTELMIC_OFFLOAD_H + +/* Support for OpenACC acc_on_device. */ + +#include "gomp-constants.h" + +#define ACCEL_COMPILER_acc_device GOMP_DEVICE_INTEL_MIC + +#endif