This does not seem to be a problem with numpy 1.6.1 on a 64-bit platform:
In [3]: np.dtype(np.uintp)
Out[3]: dtype('uint64')
In [4]: np.dtype(np.uintp) == np.dtype(np.uint64)
Out[4]: True
In [5]: hash(np.dtype(np.uintp))
Out[5]: -7981643793158015352
In [6]: hash(np.dtype(np.uint64))
Out[6]: -7981643793158015352
On Jan 12, 2012, at 12:33 PM, Thomas Wiecki wrote:
> This was pretty hairy to debug, but I tracked it down:
>
> In [14]: np.dtype(np.uintp)
> Out[14]: dtype('uint32')
>
> In [15]: np.dtype(np.uintp) == np.dtype(np.uint32)
> Out[15]: True
>
> In [17]: hash(np.dtype(np.uintp))
> Out[17]: 1198097502
>
> In [18]: hash(np.dtype(np.uint32))
> Out[18]: -98813048
>
> I encountered the problem when using gpuarray.arange which causes one
> argument to be set to uintp in the following line elementwise.py:144:
> arguments.append(ScalarArg(np.uintp, "n"))
>
> Can anyone test if this replicates with his numpy (mine is 1.6.1)?
>
> Thomas
>
> On Fri, Dec 30, 2011 at 9:36 PM, Andreas Kloeckner
> <[email protected]> wrote:
>> On Fri, 30 Dec 2011 20:03:44 +0100, Thomas Wiecki <[email protected]>
>> wrote:
>>> Hi Andreas,
>>>
>>> glad to see that you followed up on this issue. I will try to boil it
>>> down but noticed that when I was investigating the issue back then I
>>> could not easily reproduce the problem. For some reason the dict
>>> stored dtype was hashing to something else. Can you easily point me to
>>> the place where the dict is created?
>>
>> Sure.
>>
>> - Initial fill in pycuda.compyte.dtype._fill_dtype_registry().
>> - Vector types added in pycuda.gpuarray._create_vector_types().
>>
>> Andreas
>>
>> PS: Please make sure to keep the list cc'd.
>
> _______________________________________________
> PyCUDA mailing list
> [email protected]
> http://lists.tiker.net/listinfo/pycuda
_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda