From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 36916 invoked by alias); 20 Jul 2015 18:53:57 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 36904 invoked by uid 89); 20 Jul 2015 18:53:57 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f175.google.com Received: from mail-wi0-f175.google.com (HELO mail-wi0-f175.google.com) (209.85.212.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 20 Jul 2015 18:53:56 +0000 Received: by wicmv11 with SMTP id mv11so22543338wic.0 for ; Mon, 20 Jul 2015 11:53:53 -0700 (PDT) X-Received: by 10.180.206.176 with SMTP id lp16mr23806848wic.85.1437418433199; Mon, 20 Jul 2015 11:53:53 -0700 (PDT) Received: from msticlxl57.ims.intel.com ([192.55.54.42]) by smtp.gmail.com with ESMTPSA id gb16sm13105843wic.5.2015.07.20.11.53.50 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jul 2015 11:53:52 -0700 (PDT) Date: Mon, 20 Jul 2015 19:40:00 -0000 From: Ilya Verbin To: Jakub Jelinek Cc: gcc-patches@gcc.gnu.org, Kirill Yukhin Subject: Re: [gomp4.1] Initial support for some OpenMP 4.1 construct parsing Message-ID: <20150720185342.GA350@msticlxl57.ims.intel.com> References: <20150429111406.GE1751@tucnak.redhat.com> <874mnzrw1z.fsf@schwinge.name> <20150429120644.GG1751@tucnak.redhat.com> <20150609183608.GA47936@msticlxl57.ims.intel.com> <20150609202426.GG10247@tucnak.redhat.com> <20150625194529.GB33078@msticlxl57.ims.intel.com> <20150625201058.GK10247@tucnak.redhat.com> <20150717163136.GB15252@msticlxl57.ims.intel.com> <20150717164306.GT1780@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717164306.GT1780@tucnak.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg01686.txt.bz2 On Fri, Jul 17, 2015 at 18:43:06 +0200, Jakub Jelinek wrote: > On Fri, Jul 17, 2015 at 07:31:36PM +0300, Ilya Verbin wrote: > > One big question is who will maintain the list of scheduled job, its > > dependencies, etc. - libgomp or each target plugin? > > > > > > OpenACC has async queues: > > #pragma acc parallel async(2) wait(1) > > > > But it's not possible to have 2 waits like: > > #pragma acc parallel async(3) wait(1) wait(2) > > > > (GOMP_OFFLOAD_openacc_async_wait_async has only one argument with the number of > > queue to wait) > > > > Thomas, please correct me if I'm wrong. > > > > In this regard, OpenMP is more complicated, since it allows e.g.: > > #pragma omp target nowait depend(in: a, b) depend(out: c, d) > > If it is each plugin, then supposedly it should use (if possible) some > common libgomp routine to maintain the queues, duplicating the dependency > graph handling code in each plugins might be too ugly. > > > Currently I'm trying to figure out what liboffloadmic can do. Latest liboffloadmic (I'm preparing an update for trunk) can take some pointer *ptr* as argument of __offload_offload, which is used for execution and data transfer. When given job is finished, it will call some callback in libgomp on host, passing *ptr* back to it, thus libgomp can distinguish which job has been finished. BTW, which word to use here to avoid confusion? (task? job?) I'm going to prototype something in libgomp using this interface. -- Ilya