NVIDIA / NVIDIA/cccl

[FEA]: Port random number generators from `cuRand` to `Thrust`

Open
#2,510 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Area

Thrust

### Is your feature request related to a problem? Please describe.

Motivation: random number functionality in `cunumeric`. We don't have access to `cuRand` under all CPU-only builds (e.g. MacOS), but we'd still like to have access to its "exotic" generators that are available in `cuRand` but not the STL random module; e.g., XORWOW, MRG32K3A, PHILOX4_32_10, and a couple Mersenne Twister PRNGs.

### Describe the solution you'd like

Specifically, we'd like to still benefit in `Thrust` from some of the more "exotic" generators in `cuRand`; e.g., XORWOW, MRG32K3A, PHILOX4_32_10, and a couple Mersenne Twister PRNG available there.

### Describe alternatives you've considered

The only option for those specific generators is, to this day, `cuRand`.

### Additional context

Since `Thrust` makes possible to cover GPU/CPU/OpenMP functionality just by changing the execution policy, it would be nice to get the new random generators for three different execution models, with essentially same code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.