PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

CUDA Fortran: unroll directive for kernel code?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Fri Feb 04, 2011 5:42 pm    Post subject: Reply with quote

mkcolg wrote:
Hi S. Soll,

Quote:
It seems that both only apply to host code and do not change the way kernel code is generated. Did I miss something?
No, you didn't miss anything. The unroll directive only applies to host code. However, the compiler may automatically unroll loops if it finds it advantageous to do so.

- Mat


Hi Mat,
Is there a plan to support unroll of loops in kernel code soon?

Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Feb 04, 2011 8:21 pm    Post subject: Reply with quote

Hi Tuan,

The Accelerator unroll clause was added to the 11.0 compilers so is available now. The unroll clause applies to a loop directive so it's location changes it's meaning.

"!$acc do parallel unroll(n)" unrolls the parallel (block) dimension, "!$acc do vector unroll(n)" unrolls the vector (thread) dimension, while "!$acc do seq unroll(n)" will control the unrolling of loops in the kernel itself. We changed the design a bit in order give users greater control.

Hope this helps,
Mat


Last edited by mkcolg on Tue Feb 08, 2011 9:13 am; edited 1 time in total
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Tue Feb 08, 2011 1:49 am    Post subject: Reply with quote

That's a good news.


Tuan.
Back to top
View user's profile
Michael Wolfe



Joined: 19 Jan 2010
Posts: 42

PostPosted: Wed Feb 09, 2011 7:26 pm    Post subject: Reply with quote

Tuan: You are right, the unroll directive in CUDA Fortran is not being used when generating the GPU code. We will add that to our work list. We have worked on the unroller for the PGI Accelerator programming model, and that shares the code generator with CUDA Fortran, so we should be able to make use of it in CUDA Fortran as well. Thanks for pointing this out, we'll make this high priority.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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