pytorch / pytorch/pytorch

[BugReport] Exponential distribution may generate zero values on CPU backend

Open
#166,243 1 comment 0 reactions 0 assignees View on GitHub
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

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.