PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Kieee and 10.5

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



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Thu May 20, 2010 10:40 am    Post subject: Kieee and 10.5 Reply with quote

Mat (et al),

I just noticed that if I use -Mcuda and -Kieee together with 10.5, it works...or at least doesn't complain like it did with 10.4 and below:
Code:
> pgfortran -V10.4 -Mcuda=keepgpu,keepbin,keepptx,fastmath,nofma -Kieee -fast -r4 -Mextend -Mpreprocess -Ktrap=fp -DFLXY -DDEG2 -c src/sorad.FLXY.play.cuf
sorad.FLXY.play.001.gpu(252): error: expected a ")"
... cut a lot of these errors...
sorad.FLXY.play.001.gpu(1176): error: expected a ")"

25 errors detected in the compilation of "/tmp/pgnvdddXgjVTRQ3JW.nv0".
PGF90-F-0000-Internal compiler error. pgnvd job exited with nonzero status code       0 (src/sorad.FLXY.play.cuf: 1251)
PGF90/x86-64 Linux 10.4-0: compilation aborted

> pgfortran -V10.5 -Mcuda=keepgpu,keepbin,keepptx,fastmath,nofma -Kieee -fast -r4 -Mextend -Mpreprocess -Ktrap=fp -DFLXY -DDEG2 -c src/sorad.FLXY.play.cuf

Does this mean that -Kieee flag affects the CUDA code, or does it mean that host-code math contained within a .CUF can now be IEEE?

Or, should one even do this? Mix -Kieee with -Mcuda?

Matt

ETA: I just realized I have fastmath and Kieee and nofma. I think I'd need a flowchart to figure out what the different combinations of all those do...and if any of them are recommended or warned against!
Back to top
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 304
Location: Greenbelt, MD

PostPosted: Fri May 21, 2010 5:10 am    Post subject: Reply with quote

I've done a bit of experimenting and it does look like -Kieee affects the GPU code as well. I'd love to know what it changes in the GPU code since my guess is (and some testing shows) that -Kieee >> normal >> fastmath (where A>>B equals A is more precise than B).

And, of course, adding nofma seems to help everything (though it can't overcome fastmath, I'm guessing).
Back to top
View user's profile
mkcolg



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

PostPosted: Fri May 21, 2010 2:22 pm    Post subject: Reply with quote

Hi Matt,

I'd need to confirm, but my assumption is that "-Kieee" has, for the most part, the same effect that it has on regular Fortran. Things like changing the order of operation and identities would conform to IEEE 754. These types of transformations occur before the compiler gets to the GPU code generation phase

For the transcendental functions, -Kieee will use more accurate version on the CPU but not on the GPU. For fast versions on the GPU, use the "-Mcuda=fastmath" option.

- 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