PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

OpenACC / CUDA

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



Joined: 06 Sep 2011
Posts: 21

PostPosted: Fri Jun 21, 2013 6:18 am    Post subject: OpenACC / CUDA Reply with quote

Hello,

I was wondering if it was yet possible to do OpenACC/CUDA linking? I'm writing up some demo codes/slides to show the various methods of allocating/using memory in OpenACC and an example of getting a deviceptr which is then passed on to CUDA would be handy.

Cheers,
-Nick.
Back to top
View user's profile
AROM



Joined: 03 Apr 2013
Posts: 39

PostPosted: Sun Jun 23, 2013 8:42 pm    Post subject: Reply with quote

Hi Nick,

CUDA libraries and OpenACC both operate on device arrays. OpenACC provides some mechanisms for interop with library calls: host_data construct gets device address for pointers inside acc data regions; deviceptr data clause passes pre-allocated device data to OpenACC regions and loops.
The same techniques can be used to share device data between OpenACC loops and custom CUDA C/C++/Fortran/etc. device code or any CUDA Library that uses CUDA device pointers.

See http://on-demand.gputechconf.com/gtc/2012/presentations/S0517A-Monday-Programming-GPUs-OpenACC.pdf slide 63+
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