Hi,

I made a PR that use Context.attach() to fix the problem. If you want,
it could be useful to add it to the documentation.

thanks

Fred

On Mon, Jun 11, 2012 at 2:45 PM, Frédéric Bastien <[email protected]> wrote:
> thanks
>
> I'll try to finish it this week.
>
> Fred
>
> On Thu, Jun 7, 2012 at 6:11 PM, Andreas Kloeckner
> <[email protected]> wrote:
>> Frédéric Bastien <[email protected]> writes:
>>
>>> Hi,
>>>
>>> I test it, but I have this error:
>>>
>>>   File "/u/bastienf/repos/Theano/theano/misc/tests/test_pycuda_utils.py",
>>> line 4, in <module>
>>>     import theano.misc.pycuda_init
>>>   File "/u/bastienf/repos/Theano/theano/misc/pycuda_init.py", line 34,
>>> in <module>
>>>     import pycuda.autoinit
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build.old/lib.linux-x86_64-2.7/pycuda/autoinit.py",
>>> line 1, in <module>
>>>     import pycuda.driver as cuda
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build.old/lib.linux-x86_64-2.7/pycuda/driver.py",
>>> line 545, in <module>
>>>     _add_functionality()
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build.old/lib.linux-x86_64-2.7/pycuda/driver.py",
>>> line 525, in _add_functionality
>>>     Function._param_set = function_param_set_pre_v4
>>> NameError: global name 'function_param_set_pre_v4' is not defined
>>>
>>>
>>> If I change pycuda code to take the other branch from the if, I get this 
>>> error:
>>>
>>>
>>>   File "/u/bastienf/repos/Theano/theano/misc/tests/test_pycuda_utils.py",
>>> line 57, in test_to_cudandarray
>>>     px = pycuda.gpuarray.zeros((3,4,5), 'float32')
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build/lib.linux-x86_64-2.7/pycuda/gpuarray.py",
>>> line 795, in zeros
>>>     result.fill(zero)
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build/lib.linux-x86_64-2.7/pycuda/gpuarray.py",
>>> line 507, in fill
>>>     value, self.gpudata, self.mem_size)
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build/lib.linux-x86_64-2.7/pycuda/driver.py",
>>> line 480, in function_prepared_async_call
>>>     func._launch_kernel(grid, block, arg_buf, shared_size, stream)
>>>   File 
>>> "/u/bastienf/repos/pycuda.git/build/lib.linux-x86_64-2.7/pycuda/driver.py",
>>> line 486, in function___getattr__
>>>     return self.get_attribute(getattr(function_attribute, name.upper()))
>>> AttributeError: type object 'function_attribute' has no attribute
>>> '_LAUNCH_KERNEL'
>>>
>>> Do you know how to fix those errors?
>>
>> Looks like your email fell through the cracks--sorry! This should be
>> fixed in git.
>>
>> Andreas

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to