Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Use RAFT's RngState on APIs, DeviceState within kernels, and use specialized distributions for generating numbers #23

Open
Tracked by #48
MatthiasKohl opened this issue Jun 1, 2023 · 0 comments
Assignees
Labels
feature request New feature or request

Comments

@MatthiasKohl
Copy link

  1. Any API generating random numbers should use raft::random::RngState instead of the direct values for seed etc.
  2. Implementations of these APIs should call RngState.advance accordingly so that they can be invoked several times without the user having to re-seed correctly (this is not trivial !)
  3. Kernels should use DeviceState constructed from RngState in their signatures
  4. Kernels should use <GeneratorClass>(device_state, subsequence) constructors instead of direct seed / subsequence constructors which are for advanced usage in RAFT
  5. Kernels should call the appropriate distributions. For example, both kernels in unweighted_sample_without_replacement_func.cuh use bounded integer generation. They should use the appropriate RAFT distribution (https://github.com/rapidsai/raft/blob/branch-23.08/cpp/include/raft/random/detail/rng_device.cuh#L183 in this case) which are more optimized
  6. Generation for unweighted_sample_without_replacement_kernel seems wrong: idx < M may be ==N which would lead to undefined behavior. Maybe this should be idx < N instead.
@MatthiasKohl MatthiasKohl added the bug Something isn't working label Jun 1, 2023
@kingmesal kingmesal added feature request New feature or request and removed bug Something isn't working labels Aug 8, 2023
linhu-nv added a commit to linhu-nv/wholegraph that referenced this issue Aug 11, 2023
rapids-bot bot pushed a commit that referenced this issue Nov 21, 2023
Replace the random number generator (RNG) implemented by wholegraph with RNG provided by RAFT. 
It is put forward by issue #7 and issue #23.

Authors:
  - https://github.com/linhu-nv
  - Brad Rees (https://github.com/BradReesWork)

Approvers:
  - https://github.com/dongxuy04
  - Chuang Zhu (https://github.com/chuangz0)

URL: #79
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants