From patchwork Thu Oct 16 16:59:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 400333 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 C672E14009A for ; Fri, 17 Oct 2014 04:00:21 +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=j1t6ux7njLjxM5M1 /87kYz1o5/Xru6yop3EIViN80z5947dwo8YrEonH1Zs8VdTxJDCTkxuqy6czVVmF qwzWHJ5G66jeGkE57WRVoCyPqwCb3hFPHqwT9AnRQ+bgpG2WF5ITefbTWqty8l2y qcIn6yr0lBRNMgOw1WXgky8/lZI= 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=maFSswx/wLD/Gaa9DEU1O/ n2Hk4=; b=gKHv86WCS0Hfs3SDmQIsZ4j5MPPHzL2dB87BYqgagSwrfJAVCeKC6V fytsSBlhOXCu60P2QE8/sjQAaaRM6psLV3d1SRCTdsroPMpFnrdKHIYEGg0uUO4S ILh2E4rgu9X0dawQ4lCuzMUamvIerQuJfA3MlWlxUqpfUljybspKo= Received: (qmail 9675 invoked by alias); 16 Oct 2014 17:00:13 -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 9662 invoked by uid 89); 16 Oct 2014 17:00:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 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, 16 Oct 2014 17:00:11 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XeoPI-0006dq-1C from Thomas_Schwinge@mentor.com ; Thu, 16 Oct 2014 10:00:08 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Thu, 16 Oct 2014 18:00:06 +0100 From: Thomas Schwinge To: Julian Brown CC: , Jakub Jelinek Subject: Re: [gomp4] [1/3] OpenACC 2.0 support for libgomp - OpenACC runtime, NVidia PTX/CUDA plugin In-Reply-To: <20141014171118.6cec6fb4@octopus> References: <20141014171118.6cec6fb4@octopus> <20141014171142.14aa7de4@octopus> <20141014171207.2f06eb00@octopus> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 16 Oct 2014 18:59:49 +0200 Message-ID: <87h9z4uf0a.fsf@schwinge.name> MIME-Version: 1.0 Hi Julian! On Tue, 14 Oct 2014 17:11:18 +0100, Julian Brown wrote: > This is a slightly-updated version of the following patch, but this > time tested (with the aid of a series of patches implementing PTX > support from Bernd Schmidt), and against the gomp4 branch: > > https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02022.html > > Results (at least for the parts where the middle-end support is on the > branch already) are comparable with our local development branch. > > Many of Jakub's initial review comments from the mainline version of > the patch have not yet been addressed, but I have a couple of bits ready > as follow-up patches and will be posting those shortly also. I plan to > address the remainder of the issues directly on the gomp4 branch, if > possible. > > OK to apply (to the gomp4 branch)? Yes, thanks! Also the tests and initial documentation patches. As you're saying, further incremental patch will be required on top of that; just one small request at this time: > libgomp/ > * oacc-host.c: New file. As this one completely obsoletes the existing non-shared memory host plugin, you might as well just remove that file, libgomp/plugin-host.c, as part of your commit. Also to everyone working on the gomp-4_0-branch: a patch like the following one will temporarily be required to avoid a lot of ICEs, until propagation of options (-fopenacc, -fopenmp) is available in LTO/offloading mode; for the time being, always enable all OpenACC and OpenMP builtins: Grüße, Thomas --- gcc/builtins.def +++ gcc/builtins.def @@ -151,7 +151,8 @@ along with GCC; see the file COPYING3. If not see #undef DEF_GOACC_BUILTIN #define DEF_GOACC_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - false, true, true, ATTRS, false, flag_openacc) + false, true, true, ATTRS, false, \ + (/* TODO */ true || flag_openacc)) #undef DEF_GOACC_BUILTIN_COMPILER #define DEF_GOACC_BUILTIN_COMPILER(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ @@ -163,7 +164,7 @@ along with GCC; see the file COPYING3. If not see #define DEF_GOMP_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ false, true, true, ATTRS, false, \ - (flag_openmp || flag_tree_parallelize_loops)) + (/* TODO */ true || flag_openmp || flag_tree_parallelize_loops)) /* Builtin used by implementation of Cilk Plus. Most of these are decomposed by the compiler but a few are implemented in libcilkrts. */