PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

How CUDA Fortran map operations to cuda bin code

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



Joined: 11 Jun 2009
Posts: 233

PostPosted: Sun Nov 28, 2010 12:49 pm    Post subject: How CUDA Fortran map operations to cuda bin code Reply with quote

The native instructions is more effective than the regular one, as pointed out in the CUDA C programming guide. I'm not sure if CUDA Fortran utilize these functions or not, or there is a way that user can choose to use the native instructions, rather the normal one?

(Sect.5.4.1)
Quote:
Single-Precision Floating-Point Addition and Multiplication Intrinsics
__fadd_r[d,u], __fmul_r[d,u], and __fmaf_r[n,z,d,u] (see Section C.2.1) compile to tens of instructions for devices of compute capability 1.x, but map to a single native instruction for devices of compute capability 2.0.
Single-Precision Floating-Point Division
__fdividef(x, y) (see Section C.2.1) provides faster single-precision floating-point division than the division operator.


Thanks
Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Nov 29, 2010 4:54 pm    Post subject: Reply with quote

Hi Tuan,

The "-Mcuda=nofma" will use the fmul routines in order to avoid Fuse-Multiply-Add operations on the GPU. By default, the compile will use the fdiv for divides and "/" when "-Mcuda=fastmath" is added. For fdivides, I'll put in a feature request.

- 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