This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,openacc] Set safelen to INT_MAX for oacc independent pragma
- From: Julian Brown <julian at codesourcery dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Mon, 3 Dec 2018 23:53:23 +0000
- Subject: Re: [patch,openacc] Set safelen to INT_MAX for oacc independent pragma
- References: <25c37643-359f-e617-d9d4-ed6d65f1f8f1@codesourcery.com>
On Thu, 20 Sep 2018 11:21:28 -0700
Cesar Philippidis <cesar@codesourcery.com> wrote:
> This is another old gomp4 OpenACC patch which impacts targets that use
> simd vectorization, such as the host and AMD GCN, rather than nvptx.
> Basically, as the subject states, it sets safelen to INT_MAX for
> independent acc loops, which I believe is already being done for
> OpenMP in certain situations.
>
> The original discussion for this patch can be found here
> <https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01872.html>.
>
> Is this patch OK for trunk? I bootstrapped and regtested it for x86_64
> Linux with nvptx offloading.
I believe this is conservatively safe, although I understand that a
safelen of INT_MAX does not correspond strictly to the way a GPU will
execute greater-than-warp-size numbers of independent loop iterations.
This isn't a problem for NVPTX (which IIUC does not use the information
carried by the safelen setting at present) or the host, but may need
attention for e.g. AMD GCN or other GPUs that use a similar execution
scheme.
This may need merging with the non-marked_independent parts of:
https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00140.html
Julian