[BugReport] Exponential distribution may generate zero values on CPU backend
Open
module: distributions
triaged
- Dominant language
- Python
- Stars
- 103k
- Forks
- 29.5k
- PR merge metrics
- PR metrics pending
Description
### 🐛 Describe the bug
Inspired by https://github.com/pytorch/pytorch/pull/159386
I find https://github.com/pytorch/pytorch/blob/6494cdc40c55a7ff5d2c94788f7fbf5d4822ae7c/aten/src/ATen/native/Distributions.cpp#L614-L620
and then I find https://github.com/pytorch/pytorch/blob/6494cdc40c55a7ff5d2c94788f7fbf5d4822ae7c/aten/src/ATen/core/TransformationHelper.h#L128-L145
This is a historical problem.
On CPU, there is a very low probability to generate 0 from exponential.Though it's pretty low, it must be resolved and unified.
### Versions
None
cc @fritzo @neerajprad @alicanb @nikitaved
Contributor guide
Assessment
This issue has not been assessed yet.