On Jul 21, 8:53 pm, Carl Witty <[EMAIL PROTECTED]> wrote: > CUDA includes 2 programming languages (a C dialect and a low-level > assembly language), and a library to load programs into the graphics > card, send data back and forth, call the programs, etc. (There's also > a mode where you write your program in a combination of regular C and > CUDA's dialect; the CUDA tools compile the CUDA part themselves, pass > the regular parts to your regular C compiler, and automatically > construct glue code to tie the two together.) > > Actually, the above is a simplification: CUDA includes 2 separate > libraries to load programs/exchange data/call the programs, and you > apparently cannot mix and match. CUDA includes fast BLAS and FFT > implementations that run on the GPU; to use these, you must use the > "high-level" API, but pycuda is based on the "low-level" API. ... > mabshoff doesn't like the idea of recreating pycuda using Cython, but > I think it's reasonable. pycuda is actually pretty small (650 lines > of Python, 1325 lines of C++; the 1325 lines of C++ would probably be > replaced by a much smaller number of lines of Cython). Doing the > rewrite would also give a chance to switch from the low-level to the > high-level API, which would make it much easier (possible?) to use the > CUDA BLAS and FFT.
I've been doing some more reading, and using the high-level API is not as easy as I was guessing. The problem is that from the high-level API, there seems to be no documented way to load a ".cubin" CUDA object file from disk; instead, the object file must be linked into the program. Building a new Python extension for every new CUDA program probably works (like how %cython works in the notebook), but it's pretty annoying. Carl --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
