PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Course

PGI OpenACC nvcc compiler flags (or cuda flags)

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



Joined: 29 Nov 2013
Posts: 5

PostPosted: Tue Mar 11, 2014 1:49 pm    Post subject: PGI OpenACC nvcc compiler flags (or cuda flags) Reply with quote

Hi,

As I understood PGI OpenACC performs source-to-source translation and obtains cuda which is further compiled by nvcc. If yes, how could I see exactly which compiler flags are applied to nvcc and how could I control them?

Jasmine
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 12, 2014 11:38 am    Post subject: Reply with quote

Hi Jasmine,

The current default is to perform a source translation to either optimized low level CUDA C for NVIDIA targets or OpenCL for AMD targets. However, we don't invoke nvcc driver directly, rather the lower level device compilers. In both cases, you can inspect the intermediary device files via the "-ta" flag's "keep" sub-option.

While you can not directly modify the flags passed to the back-end compilers. You can effect what is passed using the "-ta" sub-options. The exact sub-options does vary from release to release so please see "pgfortran -ta -help" or "pgcc -ta -help" to see the exact options available.

Hope this helps,
Mat
Back to top
View user's profile
Jasmine028



Joined: 29 Nov 2013
Posts: 5

PostPosted: Fri Mar 14, 2014 10:17 am    Post subject: Reply with quote

Assuming I add O0 (optimization level) flag at -ta list. Shouldn't this optimization level be applied to cuda compilation phase?

I'm asking since I observed that when using different optimization levels inside "-ta" you obtain different cuda files. And this is associated with pgi phase when cuda code is generated not with cuda code compilation.

Jasmine
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Mar 17, 2014 10:43 am    Post subject: Reply with quote

Hi Jasmine,

While not documented or officially supported, you can effect the optimization level of the back-end device compiler by passing in "O0", "O1", "O2", or "O3" by setting "-ta=tesla:O0", (the default being "O2"). However, this is experimental and will change soon.

In the near future, we plan on having the host command line opt level passed to the back-end device compiler. ex. setting "-O0 -acc" would pass -O0 to both the host and device compilers.

- Mat
Back to top
View user's profile
Jasmine028



Joined: 29 Nov 2013
Posts: 5

PostPosted: Fri Mar 21, 2014 3:24 pm    Post subject: Reply with quote

Thank you, 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