Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-30 Thread Tom de Vries
On 07/11/2018 09:13 PM, Cesar Philippidis wrote: > 2018-07-XX Cesar Philippidis > Tom de Vries > > gcc/ > * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ... > (PTX_DEFAULT_RUNTIME_DIM): ... this. > (nvptx_goacc_validate_dims): Set default worker and

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Tom de Vries
On 07/26/2018 04:27 PM, Cesar Philippidis wrote: > Hi Tom, > > I see that you're reviewing the libgomp changes. Please disregard the > following hunk: > > On 07/11/2018 12:13 PM, Cesar Philippidis wrote: >> @@ -1199,12 +1202,59 @@ nvptx_exec (void (*fn), size_t mapnum, void >> **hostaddrs, void

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Cesar Philippidis
Hi Tom, I see that you're reviewing the libgomp changes. Please disregard the following hunk: On 07/11/2018 12:13 PM, Cesar Philippidis wrote: > @@ -1199,12 +1202,59 @@ nvptx_exec (void (*fn), size_t mapnum, void > **hostaddrs, void **devaddrs, >

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Tom de Vries
>> Right, in fact there are two separate things you're trying to address >> here: launch failure and occupancy heuristic, so split the patch. > That hunk was small, so I included it with this patch. Although if you > insist, I can remove it. Please, for future reference, always assume that I

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-26 Thread Tom de Vries
> Content-Type: text/x-patch; name="trunk-libgomp-default-par.diff" > Content-Transfer-Encoding: 7bit > Content-Disposition: attachment; filename="trunk-libgomp-default-par.diff" >From https://gcc.gnu.org/contribute.html#patches : ... We prefer patches posted as plain text or as MIME parts of

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-11 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: Now it follows the formula contained in the "CUDA Occupancy Calculator" spreadsheet that's

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-02 Thread Cesar Philippidis
On 07/02/2018 07:14 AM, Tom de Vries wrote: > On 06/21/2018 03:58 PM, Cesar Philippidis wrote: >> On 06/20/2018 03:15 PM, Tom de Vries wrote: >>> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: Now it follows the formula contained in the "CUDA Occupancy Calculator" spreadsheet that's

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-07-02 Thread Tom de Vries
On 06/21/2018 03:58 PM, Cesar Philippidis wrote: > On 06/20/2018 03:15 PM, Tom de Vries wrote: >> On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >>> Now it follows the formula contained in >>> the "CUDA Occupancy Calculator" spreadsheet that's distributed with CUDA. >> >> Any reason we're not

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-29 Thread Cesar Philippidis
On 06/29/2018 10:12 AM, Cesar Philippidis wrote: > Ping. While porting the vector length patches to trunk, I realized that I mistakenly removed support for the environment variable GOMP_OPENACC_DIM in this patch (thanks for adding those test case Tom!). I'll post an updated version of this patch

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-29 Thread Cesar Philippidis
Ping. Ceasr On 06/20/2018 02:59 PM, Cesar Philippidis wrote: > At present, the nvptx libgomp plugin does not take into account the > amount of shared resources on GPUs (mostly shared-memory are register > usage) when selecting the default num_gangs and num_workers. In certain > situations, an

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-21 Thread Cesar Philippidis
On 06/20/2018 03:15 PM, Tom de Vries wrote: > On 06/20/2018 11:59 PM, Cesar Philippidis wrote: >> Now it follows the formula contained in >> the "CUDA Occupancy Calculator" spreadsheet that's distributed with CUDA. > > Any reason we're not using the cuda runtime functions to get the > occupancy

Re: [patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-20 Thread Tom de Vries
On 06/20/2018 11:59 PM, Cesar Philippidis wrote: > Now it follows the formula contained in > the "CUDA Occupancy Calculator" spreadsheet that's distributed with CUDA. Any reason we're not using the cuda runtime functions to get the occupancy (see PR85590 - [nvptx, libgomp, openacc] Use cuda

[patch] adjust default nvptx launch geometry for OpenACC offloaded regions

2018-06-20 Thread Cesar Philippidis
At present, the nvptx libgomp plugin does not take into account the amount of shared resources on GPUs (mostly shared-memory are register usage) when selecting the default num_gangs and num_workers. In certain situations, an OpenACC offloaded function can fail to launch if the GPU does not have