PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Outputing the CUDA C the accelerator constructs?
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
TheMatt



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

PostPosted: Mon Jul 13, 2009 7:55 am    Post subject: Outputing the CUDA C the accelerator constructs? Reply with quote

My question is more of in the vein of "help me to continue to learn CUDA" than a "get this to work". Namely, I was wondering if there was a pgfortran compiler option that one can use to get the compiler to output the CUDA code generated by the accelerator.

Following Dr Wolfe's videos on this site, I constructed the Matrix Multiplication Driver/Kernel pairing that he demonstrates and tested them. On doing so, I used the -Minfo=all,accel -ta=nvidia options, and it does provide quite useful and interesting information about how the accelerator was working. I had just wondered if there was a further compiler option that might write out not just the $!acc do parallel, vector(16) calls, but the CUDA calls themselves, so I could see the shared memory, register, etc. transformations.
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Jul 13, 2009 3:52 pm    Post subject: Reply with quote

Hi TheMatt,

At this time we have not made this option available but are considering it. The problem is not so much exposing the generated CUDA code but the follow-up question of "can I then modify the generated CUDA code and have my application use the modified version?" is technically challenging since CUDA does not have a linker.

Thanks,
Mat
Back to top
View user's profile
TheMatt



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

PostPosted: Tue Jul 14, 2009 9:16 am    Post subject: Reply with quote

Mat,

Heh, I hadn't even thought of that. Rather, I was just thinking of learning what certain Accelerator options do, etc, in terms of CUDA. If I wanted to take the next step as you state, it'd be more toward thinking about converting my Fortran code into pure CUDA C to see if I can squeeze more performance out. That way, I'd have a starting point.

And, as I said, learning "better" CUDA through your Accelerator logic which has more expert minds behind them.

Matt
Back to top
View user's profile
mkcolg



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

PostPosted: Tue Jul 14, 2009 11:20 am    Post subject: Reply with quote

Hi Matt,

We've decided that we'll add a flag to the next release (9.0-3) that will allow the user to keep the intermediate CUDA code. It will just be the generated kernel, but will give you at least a starting point.

Thanks,
Mat
Back to top
View user's profile
TheMatt



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

PostPosted: Tue Oct 06, 2009 7:37 am    Post subject: Reply with quote

mkcolg wrote:
We've decided that we'll add a flag to the next release (9.0-3) that will allow the user to keep the intermediate CUDA code. It will just be the generated kernel, but will give you at least a starting point.
Mat, I can't seem to find the option for this in 9.0-4, so could you post it? Now that I'm starting to look at/use CUDA Fortran and having to remap my brain, this could be useful to me.
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