PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

calling a GPU kernel subroutine from a global subroutine
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Mon Jul 06, 2015 3:11 pm    Post subject: calling a GPU kernel subroutine from a global subroutine Reply with quote

Hi group,

how can I call a subroutine (GPU kernel) from a global (GPU kernel) subroutine? what things I need to be aware of?

I remember doing so a while back but it was complaining that it's illegal operation to do. I might missed something.

cheers!

Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 06, 2015 10:06 pm    Post subject: Reply with quote

Hi Dolf,

Please see section 2.5.3 and 2.5.4 of the CUDA Fortran Users Guide: http://www.pgroup.com/doc/pgicudaforug.pdf

As for the illegal operation, I'm not sure. If you encounter it again, post an example and we can determine the issue.

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Tue Jul 07, 2015 12:15 pm    Post subject: RE: Reply with quote

Hi Matt,

thanks for the reply. I have read the user manual. there are some restrictions on using such techniques. Can you post an example to better understand?
say we have a global subroutine (that have been called from host subroutine using chevrons). In that global subroutine there is a line which calls a device subroutine. You can show us what restrictions needs to be avoided.

Regards,
Dolf
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Jul 08, 2015 12:43 am    Post subject: Reply with quote

Hi Dolf,

Other than what's in the user's guide, I don't have a list of restrictions. Other than the normal device code restrictions, there not much difference than what can be done in the "global" versus what can be done in "device". Is there a specific issue that you're encountering?

For examples, we have many general CUDA Fortran examples in "$PGI/
pgi/linux86-64/2015/examples/CUDA-Fortran/". Though, it appears that we don't have much for "device" routines except for the trivial example in "SDK/sgemm/sgemm.cuf".

- Mat
Back to top
View user's profile
Dolf



Joined: 22 Mar 2012
Posts: 106

PostPosted: Wed Jul 08, 2015 11:42 am    Post subject: RE: Reply with quote

I am using windows version of PVF 15.3. I can't see the folder location you are referring to.

Dolf
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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