PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Kernel argument list

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
nickaj



Joined: 06 Sep 2011
Posts: 21

PostPosted: Thu Jul 19, 2012 1:53 am    Post subject: Kernel argument list Reply with quote

I get the following error when compiling some OpenACC code using v12.5.

PGC-W-0155-Compiler failed to translate accelerator region (see -Minfo messages): Kernel argument list is > 256 bytes, the max supported by CUDA (le_core.c: 286)

The code originally used function calls but the compiler didn't like this so I inlined all the function calls (by copy + paste) and I suspect I now have just too many variables hence overflowing the arguement list.

So, a few questions for the panel:
1. Is too many variables likely the cause of this error?
2. Are there any general strategies for avoiding this? What about stuffing scalars into a struct/array for example?
3. Are we likely to see support for the compiler inlining function calls?

I'd post the code here but it's a bit of a monster so I can email it in if necessary.


Cheers,
-Nick.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6208
Location: The Portland Group Inc.

PostPosted: Thu Jul 19, 2012 10:21 am    Post subject: Reply with quote

Hi Nick,

This is a known problem (TPR#18752) that first started up in 12.5. Normally we have a work-around for NVIDIA's 256 byte argument limit where the arguments are wrapped up in a struct, the struct copied to the device, and then only a pointer to the struct is passed as an argument. For some reason in 12.5, this workaround didn't kick in for all cases.

In reading the notes in TPR#18752, it doesn't look like we'll have fix in place for the next release, but it should be in the one after.

Quote:
I'd post the code here but it's a bit of a monster so I can email it in if necessary.
Unless it's a real pain to send, having a second example of the problem doesn't hurt. If anything, we can then make sure that we've fixed it in you particular case and notify you directly once the fix is in place. I actually found the original issue, so yours is the first known external report.

Quote:
2. Are there any general strategies for avoiding this? What about stuffing scalars into a struct/array for example?
An array might work, but since this is temporary issue, I wouldn't change your program too much especially if 12.4 works for you.

Quote:
3. Are we likely to see support for the compiler inlining function calls?
The compiler does support inlining function calls. There are cases where it can't, but I'd need to know more specifics about your case to tell why the function is not inlining and if it's even possible.

- Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group