Are you running Windows or Linux? If the latter, you should check out https://github.com/run4flat/perl-CUDA-Minimal.
If you're on Windows, I'm afraid I'm not sure how you could go about combining CUDA and Perl. As of a year ago, you were required to use Microsoft's Visual C compiler to compile CUDA stuff on Windows. This means that you (probably) need to compile your Perl with MSVC, and then you need to write and compile a Perl module that provides the various hooks for CUDA in Perl. The whole MSVC/Perl build chain is a mystery to me, so I didn't explore it. If you're on Linux, then CUDA::Minimal will provide what you need to copy PDL data to your video card and retrieve data from your video card into a piddle (or a plain Perl scalar, if you like). You'll need to write your own kernels, and then write XS wrappers to invoke them. I have some code that I wrote 1 1/2 years ago that could demonstrate how all this works, if you'd like to see it. But, again, this only works on Linux at the moment. If you're on Windows, you'll need to sort through build chain issues. The most important thing to bear in mind is that a naive combination of PDL and CUDA does not give much in the way of performance benefits. You might think to overload any PDL operation to copy the data to the video card, run the operation, and copy back the results, but it turns out the copy to/from the video card kills the performance gain for almost anything except matrix-matrix multiplication. For this reason, I didn't explore overloading PDL methods with CUDA ones, though there is room for this sort of work. Anyway, let me know if you have questions. Maybe I'll actually put CUDA::Minimal on CPAN. :-) David On Sat, Aug 4, 2012 at 4:52 PM, MARK BAKER <[email protected]> wrote: > Hello World! > > I just got my Tesla C870 installed and it looks like its working > (I got two the other one was screaming) anyway, what do I need to do > to get this to work with PDL ??? I seen some youtube videos; that > got the Tesla C870 working with the CUDA SDK I wonder if there > might be some way to intergrate that with PDL ... > > so before I start is there a easy way to do this ??? > > I know I have to use the CUDA SDK which I assume is > written in C and uses C as the language of choice, am I right > about that... > > Is there a way to get PDL to talk with the CUDA SDK > or more like a PDL::CUDA::SDK module ??? > > Thanks > > -Mark > > > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan _______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
