On Freitag 06 Februar 2009, you wrote:
> Hello,
>
> thanks for good news. The 'if __name__ == "__main__":'
> clause with my tests could be probably removed.

It doesn't hurt, I'd prefer to leave it in.

> Also note that I removed the dtype argument of rand function.

I've tacked the dtype argument back on, but made it raise an error if != 
float32. Moderately pointless, but at least it matches the docs now. :)

> Kernel normalizes raw random bits from md5 to float32,
> so other dtypes make no sense. Well, one could have slightly
> different kernels (without normalization) for all integer
> types ...

Agreed that that would be easy. I don't need it right now, so I'll wait for 
somebody to send a patch.

> Do you have any idea how to use all 16 bytes of md5?  I mean
> how to modify the block/grid sizes to have one thread for 4
> elements?

You could do it like this:

[123456..][123456...]

where thread 1 writes the first 4 bytes to the first spot labelled 1, the 
second to the second, etc. Just need to check for out of bounds and get your 
rounding right.

> Also as I tried the git version I found that I have a compilation
> problem since commit:
>
> fab598676dbb4c43f53ad1c306a7880061bf6518
> Make memory pool less wasteful: Use quasi-floating point values as bin nr.
>
> x86_64-pc-linux-gnu-g++ -pthread -fPIC -Isrc/cpp
> -I/opt/cuda/include/
> -I/usr/lib64/python2.5/site-packages/numpy/core/include
> -I/usr/include/python2.5 -c -Isrc/cpp -I/opt/cuda/include/
> -I/usr/lib64/python2.5/site-packages/numpy/core/include
> -I/usr/include/python2.5 -c src/wrapper/tools.cpp -o
> build/temp.linux-x86_64-2.5/src/wrapper/tools.o
> src/wrapper/tools.cpp: In member function 'typename
> Allocator::pointer<unnamed>::memory_pool<Allocator>::allocate(typename
> Allocator::size_type) [with Allocator =
> <unnamed>::cuda_allocator]':
> src/wrapper/tools.cpp:348:   instantiated from here
> src/wrapper/tools.cpp:220: error: no match for 'operator=='
> in '<unnamed>::memory_pool<Allocator>::bin_number [with
> Allocator = <unnamed>::cuda_allocator](alloc_sz) == bin'
> error: command 'x86_64-pc-linux-gnu-g++' failed with exit
> status 1
> make: *** [all] Error 1
>
> I have boost 1.34.1, numpy 1.2.1, gcc 4.1.2, python 2.5.2 and
> cuda 2.1

Ah great, gcc 4.1 being fabulous again. I tried this gcc here:

gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)

and I didn't have a problem. (Important note: http://is.gd/iFIp)
Since I can't reproduce it, can you try and see what's wrong there? Also, the 
file src/wrapper/tools.cpp hasn't been in use for quite a while, maybe your 
checkout went bad somehow?

Andreas

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyCuda mailing list
[email protected]
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to