tensorflow / tensorflow/probability
`JointDistribution`s yield different PRNG behaviour on GPU and CPU
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 4.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi All,
I noticed recently that stateless PRNG behaviour for JointDistribution* objects appear to do different things depending on whether random numbers are generated on GPU or CPU. This is demonstrated this Colab.
This appears to go against the assertions in the tf.random.stateless_* documentation that suggests that PRNG behaviour should be consistent across CPU and GPU devices. I guess that there may be reordering of operations within the JointDistribution* logic, but perhaps this should be documented?
Regards,
Chris
[edit] interestingly, this seems relevant only to Eager and Graph mode. XLA mode appears consistent.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Colab and reproduce the JointDistribution stateless PRNG results on CPU and GPU in Eager, Graph, and XLA modes. Then trace the JointDistribution* execution and the stateless PRNG documentation to determine whether operation reordering causes the difference. Done means establishing whether the behavior is a bug or needs documentation, with a reproducible test or a clearly documented expectation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100