This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [nvptx] Try to cope with cuLaunchKernel returning CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES
- From: Thomas Schwinge <thomas at codesourcery dot com>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: Alexander Monakov <amonakov at ispras dot ru>, Bernd Schmidt <bschmidt at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Jan 2016 15:40:44 +0100
- Subject: Re: [RFC] [nvptx] Try to cope with cuLaunchKernel returning CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES
- Authentication-results: sourceware.org; auth=none
- References: <1453195932 dot 96 dot 0 dot 59001766349 dot issue17226 at mentor dot com> <87oacheqlz dot fsf at hertz dot schwinge dot homeip dot net> <569E3E56 dot 4010003 at acm dot org>
Hi!
On Tue, 19 Jan 2016 08:47:02 -0500, Nathan Sidwell <nathan@acm.org> wrote:
> On 01/19/16 06:49, Thomas Schwinge wrote:
> > int axis = get_oacc_ifn_dim_arg (call);
> > + if (axis == GOMP_DIM_WORKER)
> > + {
> > + /* libgomp's nvptx plugin might potentially modify
> > + dims[GOMP_DIM_WORKER]. */
> > + return NULL_TREE;
> > + }
>
> this is almost certainly wrong. You're preventing constant folding in the
> compiler.
Yes, because if libgomp can modify dims[GOMP_DIM_WORKER], in the compiler
we can no assume it to be constant? (Did result in a run-time test
verification failure.) Of course, my hammer might be a too big one
(which is why this is a RFC).
GrÃÃe
Thomas