Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-04 Thread Ian Ozsvald
Andreas - the patches work, cheers. Both of my tests (which failed yesterday) work first time, no warning messages are shown either (yesterday there were heaps of them). Much obliged, Ian. On 3 March 2010 21:58, Andreas Klöckner li...@informa.tiker.net wrote: On Mittwoch 03 März 2010, Ian

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-04 Thread Ian Ozsvald
Scratch the last - the same errors occur with the latest master as listed below. In my haste I didn't remove the already-compiled kernels (I cleared the wrong cache directory sigh). The fix is to comment out lines 312 and 457 of pycuda-complex.hpp and recompile, I still get a ton of warning

[PyCUDA] Int detection in function kernel invocation

2010-03-04 Thread Fabrizio Milo aka misto
Hi, I had to add the patch in attachment to make work a kernel like void kernel( float* out, int size){ } I am not 100% sure it's corret. PTAL Fabrizio -- Luck favors the prepared mind. (Pasteur) 0001-added-int-detection.patch Description: Binary data

Re: [PyCUDA] Int detection in function kernel invocation

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Fabrizio Milo aka misto wrote: Hi, I had to add the patch in attachment to make work a kernel like void kernel( float* out, int size){ } Unless you're using prepared invocation, you have to use Numpy's sized integers/floats:

Re: [PyCUDA] Int detection in function kernel invocation

2010-03-04 Thread Fabrizio Milo aka misto
Unless you're using prepared invocation, you have to use Numpy's sized integers/floats: I see. Did the patch with the decorators, get trough or got lost yesterday? Fabrizio -- Luck favors the prepared mind. (Pasteur) ___

Re: [PyCUDA] Patch for error C2143: syntax error : missing '; ' before 'type' on latest master for MSVC

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Ian Ozsvald wrote: Scratch the last - the same errors occur with the latest master as listed below. In my haste I didn't remove the already-compiled kernels (I cleared the wrong cache directory sigh). The fix is to comment out lines 312 and 457 of

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Imran Haque
Fabrizio Milo aka misto wrote: b) Imports with side effects are bad. (pycuda.autoinit is the only module with side-effects in PyCUDA--and the side effect is its only purpose.) I agree side effects are bad!! I don't think this is a side effect. This is how you would use the cuda driver. any and

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread J-Pascal Mercier
On Thursday 04 March 2010 07:59:34 pm Imran Haque wrote: I disagree. It's important to know if the CUDA libraries are getting reinitialized; particularly on multi-GPU systems, there can be significant overhead in calling cuInit. Agreed, In particular, if your program uses libraries that

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Fabrizio Milo aka misto
does anyone has an example of a program where doesn't use the cuda.autoimport before using any of the pycuda.* ? I can't think to an example. Also in multi thread, cuInit should be called only once. Fabrizio -- Luck favors the prepared mind. (Pasteur)

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Imran Haque
Fabrizio Milo aka misto wrote: does anyone has an example of a program where doesn't use the cuda.autoimport before using any of the pycuda.* ? Yes, my library (shameless plug: https://simtk.org/home/siml) manually handles CUDA initialization, because just getting some context from autoinit

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Imran Haque wrote: Fabrizio Milo aka misto wrote: does anyone has an example of a program where doesn't use the cuda.autoimport before using any of the pycuda.* ? Yes, my library (shameless plug: https://simtk.org/home/siml) Cool--I've added that to

Re: [PyCUDA] More Patches, and cuda.init() elimination

2010-03-04 Thread Andreas Klöckner
On Donnerstag 04 März 2010, Fabrizio Milo aka misto wrote: The work around should simple be to import pycuda after the fork. Importing before would be useless, because for sure you can't initialize cuInit and thus can't use any cu* function.. Or I am missing something ? Imports might happen