This is getting very weird. I went into the function with pdb now.
np.dtype('uint32') is in DTYPE_TO_NAME but for some reason it fails to
look it up:
KeyError: dtype('uint32')
> /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.2-py2.7-linux-i686.egg/pycuda/compyte/dtypes.py(104)dtype_to_ctype()
103 print np.dtype('uint32') in DTYPE_TO_NAME
--> 104 print DTYPE_TO_NAME[dtype]
105 raise ValueError, "unable to map dtype '%s'" % dtype
ipdb> dtype
dtype('uint32')
ipdb> np.dtype('uint32') == dtype
True
ipdb> DTYPE_TO_NAME(np.dtype('uint32'))
'unsigned'
ipdb> DTYPE_TO_NAME[dtype]
*** KeyError: dtype('uint32')
!?,
Thomas
On Tue, Dec 13, 2011 at 8:49 PM, Thomas Wiecki <[email protected]> wrote:
> I updated the submodules and reinstalled, but am still get the same errors.
>
> On Tue, Dec 13, 2011 at 7:09 PM, Andreas Kloeckner
> <[email protected]> wrote:
>> On Tue, 13 Dec 2011 18:24:04 -0500, Thomas Wiecki <[email protected]>
>> wrote:
>>> It's the most recent git source. nvidia driver version 280.13.
>>>
>>> Here is a longer trace:
>>> /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.1-py2.7-linux-i686.egg/pycuda/tools.py:359:
>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>>> _ _ _ _ _ _ _ _ _
>>>
>>> dtype = dtype('uint32'), with_fp_tex_hack = False
>>>
>>> def dtype_to_ctype(dtype, with_fp_tex_hack=False):
>>> if dtype is None:
>>> raise ValueError("dtype may not be None")
>>>
>>> dtype = np.dtype(dtype)
>>> if with_fp_tex_hack:
>>> if dtype == np.float32:
>>> return "fp_tex_float"
>>> elif dtype == np.float64:
>>> return "fp_tex_double"
>>>
>>> try:
>>> return DTYPE_TO_NAME[dtype]
>>> except KeyError:
>>> > raise ValueError, "unable to map dtype '%s'" % dtype
>>> E ValueError: unable to map dtype 'uint32'
>>>
>>> /usr/local/lib/python2.7/dist-packages/pycuda-2011.2.1-py2.7-linux-i686.egg/pycuda/compyte/dtypes.py:103:
>>> ValueError
>>>
>>> and attached is the complete output of that unittest.
>>
>> Ah--do 'git submodule update' and rebuild. I suspect your 'compyte'
>> subpackage might be out of date.
>>
>> Andreas
>>
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda