Create random numbers in bigger chunks #72
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before we created them every clock cycle which creates significant
overhead. This implementation still needs to call one
cudaMemcpyToSymbol
per clock cycle and codeobject using rand/randn,which could be avoided.
This implementation very generically generates a max of
50MB
of random number per codeobject and regenerates them after they are used up. This way for mall simulations we only generate once and for bigger simulations (where memory is a potential limit), we don't generate too many numbers.This is a quick and dirty solution here which might fail if we run into memory limits. but for our current benchmarks its good enough and since we should probably use a cleaner buffer system at some point, I will leave it like this for now.