On 13/12/2011 05:13, Andreas Kloeckner wrote:
On Mon, 12 Dec 2011 14:03:23 -0800 (PST), Guillermo 
Andrade<guillermo.andrade-barr...@inria.fr>  wrote:
Andreas Kloeckner wrote

...
Detailed list of changes in 2011.1:

...
* Adopt stateless launch interface from CUDA, deprecate old one.
...

Hello,

Could you explain us what are you meaning by that?
for example, how do you do now to set shared memory for  extern  __shared__
declarations in kernels ?
All this information should now be passed to the kernel call, see here:

http://documen.tician.de/pycuda/driver.html#pycuda.driver.Function.__call__

CUDA (as of 4.0) has deprecated the stateful launch interface (i.e. "set
this, set that, go"). For now, PyCUDA still uses stateful launches under
the hood, but I've deprecated stateful launches in PyCUDA's user-facing
interface as well. That way, when CUDA does remove stateful launches,
I'll be in a better position to also remove the stateful interface in
PyCUDA and switch to the stateless one at the same time.

HTH,
Andreas

Thanks for your answer.

I'd followed this document.  But when i call my kernel:

testKernel = SourceModule("""

__global__ void

testKernel( float* g_idata, float* g_odata, int size_data)

{

 extern  __shared__  float sdata[];

...

""").get_function("testKernel")

testKernel(d_idata,d_odata,np.int32(num_data), block=threads, grid= grid, 
shared=shared_mem_size)


I get this message :

.../lib64/python2.6/site-packages/pycuda-2011.2.1-py2.6-linux-x86_64.egg/pycuda/driver.py:168:
 DeprecationWarning: 'set_shared_size' has been deprecated in version 2011.1. 
Please use the stateless launch interface instead.

  func.set_shared_size(shared)


if I understand you, this kernel call is good for now and for future versions. But in the current version there is a transition warning. Isn't it ?


Best regards,

--
Guillermo Andrade B.

<<attachment: Guillermo_Andrade-barroso.vcf>>

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to