-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
high prioritymodule: randomRelated to random number generation in PyTorch (rng generator)Related to random number generation in PyTorch (rng generator)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
I was looking at #22103 (thanks @xuhdev!) and I noticed a couple of issues with the previous implementation (i.e. #22103 didn't introduce them).
- The code looks wrong for non-contiguous tensors; it does a resize but that's not guaranteed to give you a contiguous tensor.
- It's surprising (and does it not cause a problem in all cases?) to use a CPU generator when you passed (potentially) in the CUDA one. And it would at least be surprising to mess with a different pseudo random stream than you passed in, even if it doesn't cause a problem.
Metadata
Metadata
Assignees
Labels
high prioritymodule: randomRelated to random number generation in PyTorch (rng generator)Related to random number generation in PyTorch (rng generator)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module