[PyCuda] PyCUDA SourceModule save_to cubin
Andreas Klöckner
lists at informa.tiker.net
Mon Feb 16 09:32:10 PST 2009
Hi Alexey,
On Montag 16 Februar 2009, JU AV wrote:
> Recently I started using your python bindings for CUDA.
> I would like to know is it possible to save cubin file after
> driver.SourceModule compiles it In my work, I want to create optimized
> computational kernels for one time at first run of my program And then use
> precompiled kernel not to slower execution of my program. I know that
> SourceModule has keep parameter but it is not obvious how to use it in
> precompilation of computational kernels
> I would be grateful if you could help me to solve my problem
Check current git. I've moved SourceModule and its related infrastructure to
pycuda.compiler. Now you can get the cubin that results from compilation by
calling pycuda.compiler.compile with the same arguments as SourceModule. You
can then do with it whatever you want. There's also
pycuda.compiler.compile_plain() that skips a bunch of niceties that compile()
has, such as caching, compute model detection, etc.
Andreas
PS: Don't worry, everybody else. SourceModule in pycuda.driver still exists--
it will print a (silenceable) deprecation warning once per Python interpreter
invocation, though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.tiker.net/pipermail/pycuda/attachments/20090216/2f6ec6ec/attachment-0001.pgp>
More information about the PyCUDA
mailing list