Dear Andreas-

Thank you for the detailed response.

At the risk of belabouring, a portion of the Marsenne Twister code
contains two kernel/functions for the Box Muller transformation calcs.
 One is defined __device__  and the other which draws on calcs of the
first is a __global__.  Would it be possible to re-code the first as a
__global__ with appropriate changes internally as well and then wrap
the two with Pycuda or am I missing something more obvious?  This may
not be an efficient use of the device but could be faster than
porting.  Of course there is a larger portion of C which accesses the
host and would need to be dealt with as well.

TIA, Vince

On Mon, Jun 29, 2009 at 2:00 PM, <[email protected]> wrote:
> Send PyCUDA mailing list submissions to
>        [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://tiker.net/mailman/listinfo/pycuda_tiker.net
> or, via email, send a message with subject or body 'help' to
>        [email protected]
>
> You can reach the person managing the list at
>        [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyCUDA digest..."
>
>
> Today's Topics:
>
>   1. Re: Wrapping SDK code... (Andreas Kl?ckner)
>   2. Re: OpenGL interop woes... help! (Andreas Kl?ckner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sun, 28 Jun 2009 15:51:28 -0400
> From: Andreas Kl?ckner <[email protected]>
> Subject: Re: [PyCUDA] Wrapping SDK code...
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="windows-1252"
>
> On Freitag 26 Juni 2009, Vince Fulco wrote:
>> Early attempts to port over the Monte Carlo Option Pricing code
>> supplied with the SDK and need to mod it for simple time series
>> bootstrapping.  Not being terribly facile in C/C++ (but learning!),
>> could someone provide a short list of the critical components which
>> need to be wrapped by pycuda?
>
> What PyCUDA can do for you is compile and execute functions marked __global__
> in that sample's source code--i.e. code that runs on the GPU. Everything else
> is CPU code, and making that accessible is beyond the scope of PyCUDA. If you
> do want to leave that CPU code in C, there are several other packages that
> might help you, ranging from Swig, Cython, Boost Python (potentially with
> codepy), to ctypes.
>
> I'm guessing that you might have the most fun if you just port the CPU control
> code to Python, though--less hassle.
>
>> I am aware of the various
>> kernels/functions necessary from the main body of code but more
>> interested in a how-to in terms of referencing the ancillary functions
>> properly.  I.E. the RNGs "MonteCarlo_SM10" and "MonteCarlo_SM13"
>> routines.
>
> See above--if you want to keep those in C, use one of the packages mentioned
> above (and worry about compiling them separately), or just quickly translate
> them to Python. (you'll find they get a fair bit shorter :P)
>
> Andreas
>
> -------------- 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://tiker.net/pipermail/pycuda_tiker.net/attachments/20090628/5f8128e3/attachment-0001.bin>
>
> ------------------------------
>
> Message: 2
> Date: Sun, 28 Jun 2009 19:54:19 -0400
> From: Andreas Kl?ckner <[email protected]>
> Subject: Re: [PyCUDA] OpenGL interop woes... help!
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="iso-8859-15"
>
> Hi Peter,
>
> sorry for the delay. I finally found some time to look at this.
>
> On Freitag 26 Juni 2009, Peter Berrington wrote:
>> If anyone can take a look at my source and offer any advice I'd really
>> appreciate it.
>
> I've got the code to a point where it runs. I'm not sure that it does what it
> should, but since I don't know my way around GL, I didn't want to mess with it
> too much. You can find the results of my efforts at
> http://codepad.org/dRXTogs3. I've also checked that file into PyCUDA's
> repository as examples/gl_interop.py with a remark that it's unfinished, to
> make sure that the progress so far doesn't get lost.
>
> Note that getting this far also required a fix in PyCUDA's GL interop bits--so
> do a git pull and rebuild before you start playing.
>
> Thank you very much for your effort and perseverence at this!
> Andreas
> -------------- 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://tiker.net/pipermail/pycuda_tiker.net/attachments/20090628/bbcad73a/attachment-0001.bin>
>
> ------------------------------
>
> _______________________________________________
> PyCUDA mailing list
> [email protected]
> http://tiker.net/mailman/listinfo/pycuda_tiker.net
>
>
> End of PyCUDA Digest, Vol 12, Issue 28
> **************************************
>



-- 
Vince Fulco, CFA, CAIA
612.424.5477 (universal)
[email protected]

 A posse ad esse non valet consequentia

“the possibility does not necessarily lead to materialization”

_______________________________________________
PyCUDA mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to