-
Notifications
You must be signed in to change notification settings - Fork 197
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
For fixing the cuGraph test failures with PCG #690
For fixing the cuGraph test failures with PCG #690
Conversation
…subsequences at different offset
Very interesting find @vinaydes ! Can you also check that this fix doesn't break cuML tests, please? Also, adding @akifcorduk and @MatthiasKohl to see if this doesn't break anything in cuOpt and cugraph-ops respectively. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM.
Yes, I'll run cuML tests with this change. |
Created cuml PR here rapidsai/cuml#4760 after making sure it works locally on my test setup. |
Also created cuGraph PR here rapidsai/cugraph#2316 |
@gpucibot merge |
Interesting, this should not break anything in cugraph-ops. Thanks @vinaydes for the fix! |
With the RAFT changes here: rapidsai/raft#690 we should be able to use the PC generator again. The PC generator is significantly faster. Closes #2266 Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Corey J. Nolet (https://github.com/cjnolet) - Seunghwa Kang (https://github.com/seunghwak) URL: #2356
RAFT's RNG class provides methods that fill a buffer with random numbers belonging to various probability distribution functions. For example
uniform
,normal
etc. In this methods, multiple instances of random number generator are used in parallel. Each cuda thread gets it own instance of generator. The instance is initialized with three valuesseed
,subsequence
andoffset
. The value forseed
is common for all threads and thread id is used forsubsequence
. Theoffset
is kept0
for all instances. To fill the buffer, the threads work in grid strided fashion demonstrated by loop below:Due to grid-striding of loops, consecutive elements in the buffer are
ith
element in consecutive subsequences. For example, 10th and 11th elements in the buffer would be 0th element in 10th and 11th subsequences. In the unit tests for cugraph, this scheme seems to introduce a slight bias in certain cases. Easy fix to the issue is to break the lock step increment of individual subsequences.This PR sets different offset value for each subsequence by setting
offset = subsequence
. Note that this change has no effect on the period of the random number generator.This should fix the cuGraph issue rapidsai/cugraph#2266 for now.