Thanks you for this very useful wrappers. I'm looking forward to try it.
Unfortunately, when I try to apply the patch, I've got the following error:
git apply curand.diff
curand.diff:9: trailing whitespace.
curand.diff:10: trailing whitespace.
curand.diff:11: trailing whitespace.
The following classes are using random number generators that run on
curand.diff:12: trailing whitespace.
Each thread uses own generator. Creation of those generators requires
curand.diff:13: trailing whitespace.
resources than subsequent generation of random numbers. After
error: patch failed: doc/source/array.rst:345
error: doc/source/array.rst: patch does not apply
error: patch failed: pycuda/curandom.py:233
error: pycuda/curandom.py: patch does not apply
On which version of the trunk should I apply the patch ?
On Tue, Jan 11, 2011 at 8:29 AM, Tomasz Rybak <bogomips(a)post.pl> wrote:
Sorry for delay - I was abroad and had limited
access to email.
Dnia 2010-12-26, nie o godzinie 17:26 +0100, Andreas Kloeckner pisze:
On Mon, 20 Dec 2010 21:41:16 +0100, Tomasz Rybak
> At the same time - could you look into
CURAND patch I have sent
> to the list (attached here)? Last email I have sent on 2010-12-15
like to finish it and then finish prefix scan.
I've taken a look at your CURAND code, here are a few comments:
- The user should not *have* to specify generator_count. Instead, we
should supply a reasonable default based on the device's compute
capability, as you describe in the docs.
(Likewise, the docs don't need to be redundant.)
- I don't like the name "Randomizer". "RandomNumberGenerator" is
but IMO a better name.
- What's the difference between the quasi- and non-quasi versions? It
looks like there's a ton of duplicated code between the two. This
should be eliminated, perhaps by inheritance or through another way.
There are two sets of kernel that deal with "random" numbers.
One uses curandState, another uses curandStateSobol32 to store state
of random number generator. NVIDIA does not give much details about
internal implementation of those kernels - only that
"The device API includes functions for Pseudorandom Sequences and
Quasirandom Sequences" and that in case of curandState sequence
has period at least 2^190 and for curandStateSobol32 and 32-bit
vector sequence has length 2^32.
Removed duplication of kernel sources and introduced inheritance.
It shortened code a little.
Should inheritance be described in documentation, or not as it
is just implementation detail?
- Tests should go in tests/test_gpuarray.py.
There are no test - just example of usage. There already
was code in block
if __name__ == '__main__'
showing how to use rand() function
I have just added code that shows usage of introduced classes.
- Rename fill_in_* to fill_*.
Thanks for your contribution! Looking forward to your comments.
Tomasz Rybak <bogomips(a)post.pl> GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
PyCUDA mailing list