On Tue, Jun 09, 2015 at 09:36:08PM +0300, Ilya Verbin wrote: > On Wed, Apr 29, 2015 at 14:06:44 +0200, Jakub Jelinek wrote: > > [...] The draft requires only alloc or to > > (or always, variants) for enter data and only from or delete (or always, > > variants) for exit data, so in theory it is possible to figure that from > > the call without extra args, but not so for update - enter data is supposed > > to increment reference counts, exit data decrement. [...] > > TR3.pdf also says about 'release' map-type for exit data, but it is not > described in the document.
Seems that is the case even in the latest draft. Can you file a ticket for this or discuss on omp-lang? Or should I? > > [...] And, we'll need new > > arguments for async (pass through info that it is async (nowait) or sync, > > and the depend clause address(es)). > > I don't quite understand from "If a depend clause is present, then it is > treated > as if it had appeared on the implicit task construct that encloses the target > construct", is > > #pragma omp target depend(inout: x) > > equivalent to > > #pragma omp task depend(inout: x) > #pragma omp target > > or not? > > In other words, can't we just generate GOMP_task (...) with GOMP_target (...) > inside, without any new arguments? No, that would be an explicit task. Furthermore, the implicit task isn't on the host side, but on the offloading device side. The implicit task is what is executed when you enter the #pragma omp target. Ignoring the teams construct which is there mainly for NVidia GPGPUs, when you enter the #pragma omp target construct, there is an implicit parallel with num_threads(1) (like there is an implicit parallel with num_threads(1) when you enter main () of a host program), and that implicit parallel has a single implicit task, which executes the statements inside of #pragma omp target body, until you encounter #pragma omp teams or #pragma omp parallel. And the above statement simply says that no statements from the #pragma omp target body are executed until the depend dependency is satisfied. Whether these dependencies are host addresses, or offloading device addresses, is something that really needs to be figured out, I admit I haven't read the whole async offloading text carefully yet, nor participated in the telecons about it. Jakub