PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

CUDA FORTRAN rsqrt()
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
frnkyl004



Joined: 06 Dec 2011
Posts: 50

PostPosted: Fri Dec 20, 2013 12:43 am    Post subject: CUDA FORTRAN rsqrt() Reply with quote

Hi All,

Is rsqrt() available in CUDA FORTRAN? I'm using the LibM module in the relevant subroutine and erf(), for example, is available and working. However, when I try to use rsqrt(), I get the following:

Code:
PGF90-S-0155-Calls from device code to a host function are allowed only in emulation mode - rsqrt
PGF90-S-0038-Symbol, rsqrt, has not been explicitly declared


I've tested it for PGI versions 13.5 through 13.10 and, where available, CUDA 4.2, 5.0 and 5.5.

Please provide a usage example of rsqrt() if it is available.

Cheers,
Kyle
Back to top
View user's profile
mkcolg



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

PostPosted: Fri Dec 20, 2013 9:50 am    Post subject: Reply with quote

Hi Kyle,

"rsqrt" isn't in libm nor is it part of Fortran. We're looking at how we can get these CUDA C extensions (like sincos, rsqrt, shfl) to be recognized in CUDA Fortran, but it's not in as of yet. Can you change your code to use "1/SQRT(x)" instead?

- Mat
Back to top
View user's profile
frnkyl004



Joined: 06 Dec 2011
Posts: 50

PostPosted: Fri Dec 20, 2013 2:49 pm    Post subject: Reply with quote

Hi Mat,

Thanks for clearing that up. I can, and I am, using 1/sqrt() instead. I'm just interested in using rsqrt() because, as far as I know, it will perform better than 1/sqrt().

Cheers,
Kyle
Back to top
View user's profile
frnkyl004



Joined: 06 Dec 2011
Posts: 50

PostPosted: Thu Jul 24, 2014 1:08 pm    Post subject: Reply with quote

Hi Mat,

I'm resurrecting this post based on your comment in http://www.pgroup.com/userforum/viewtopic.php?t=4443
Quote:
it should be straight forward to add the j0, j1, jn, y0, y1, and yn functions since they are part of the CUDA C math libraries
Does your comment also hold for rsqrt()?

All the best,
Kyle
Back to top
View user's profile
frnkyl004



Joined: 06 Dec 2011
Posts: 50

PostPosted: Wed Aug 20, 2014 12:31 pm    Post subject: Reply with quote

Awfully lonely in here...8{
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
Goto page 1, 2  Next
Page 1 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