| View previous topic :: View next topic |
| Author |
Message |
Tuan
Joined: 11 Jun 2009 Posts: 226
|
Posted: Fri Feb 04, 2011 5:42 pm Post subject: |
|
|
| 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 |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Fri Feb 04, 2011 8:21 pm Post subject: |
|
|
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 |
|
 |
Tuan
Joined: 11 Jun 2009 Posts: 226
|
Posted: Tue Feb 08, 2011 1:49 am Post subject: |
|
|
That's a good news.
Tuan. |
|
| Back to top |
|
 |
Michael Wolfe
Joined: 19 Jan 2010 Posts: 36
|
Posted: Wed Feb 09, 2011 7:26 pm Post subject: |
|
|
| 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 |
|
 |
|