Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign torch.Generator in APIs like torch.randn_like() #128786

Open
KarhouTam opened this issue Jun 16, 2024 · 0 comments
Open

Assign torch.Generator in APIs like torch.randn_like() #128786

KarhouTam opened this issue Jun 16, 2024 · 0 comments
Labels
module: python frontend For issues relating to PyTorch's Python frontend triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@KarhouTam
Copy link

KarhouTam commented Jun 16, 2024

馃殌 The feature, motivation and pitch

It is possible to add generator argument in APIs like torch.randn_like()?
Because torch.randn() has argument generator and at the same time, in my opinion, torch.randn_like(A, generator=rng_torch) should output the same result as torch.randn(A.shape, generator=rng_torch).

Alternatives

No response

Additional context

No response

cc @albanD

@mikaylagawarecki mikaylagawarecki added module: python frontend For issues relating to PyTorch's Python frontend triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: python frontend For issues relating to PyTorch's Python frontend triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

2 participants