Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify interaction of random number generators and lazyarray #553

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

apdavison
Copy link
Member

There are two changes here:
(1) previously, a random number generator with parallel_safe=False would always draw a reduced number of values when run with >1 MPI processes, according to the number of processes, unless the mask_local parameter was set to False. Now, a mask must be explicitly provided if you want to draw a reduced number of values (i.e. only those values consumed on that node), mask (renamed from mask_local) is either an array, or None, and can no longer take the value False.
(2) moved the lazyarray behaviour for RandomDistribution from the lazyarray package to PyNN, to keep all the rng-related logic in one place.

There are two changes here:
(1) previously, a random number generator with `parallel_safe=False` would always draw a reduced number of values when run with >1 MPI processes, according to the number of processes, unless the `mask_local` parameter was set to `False`. Now, a mask must be explicitly provided if you want to draw a reduced number of values (i.e. only those values consumed on that node), `mask` (renamed from `mask_local`) is either an array, or None, and can no longer take the value `False`.  
(2) moved the lazyarray behaviour for `RandomDistribution` from the lazyarray package to PyNN, to keep all the rng-related logic in one place.
@coveralls
Copy link

Coverage Status

Coverage decreased (-11.8%) to 42.535% when pulling 943384f on apdavison:lazy-rng into 86ba43b on NeuralEnsemble:master.

@apdavison apdavison merged commit 1b36565 into NeuralEnsemble:master Jan 3, 2018
@apdavison apdavison deleted the lazy-rng branch April 30, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants