Skip to content

Stateful PRNG layer on top of stateless RNG APIs - #178183

Closed
jbschlosser wants to merge 52 commits into
gh/jbschlosser/261/basefrom
gh/jbschlosser/261/head
Closed

jbschlosser wants to merge 52 commits into
gh/jbschlosser/261/basefrom
gh/jbschlosser/261/head

Conversation

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Mar 23, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/178183

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 14 Pending

As of commit ffa5fcb with merge base d39020e (image):

🟡 GREEN LIGHT - PR requires human review:

  • Triviality
    • Adds a new RNG feature, class StatefulPRNG in torch/func/_random.py, which fits no trivial class
    • _advance rounds the philox offset up per call, a stream-semantics design choice a reviewer should weigh
  • Inert addition
    • Grep finds StatefulPRNG used only in test/test_stateless_rng.py; no non-test code constructs it
  • Checker pragmas and annotations
    • Adds three # pyrefly: ignore [bad-override] pragmas to PRNGKey, and adding a checker pragma is never trivial
    • Changes the return annotation of key() from torch.Tensor to PRNGKey, which is outside the type-annotation class

reason: not_trivial
Reviewed commit: ffa5fcb

Inference job

🐛 Report a wrong verdict

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot

pytorch-bot Bot commented Mar 23, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 23, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 24, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 26, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 26, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 26, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 26, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 27, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 27, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Mar 27, 2026
jbschlosser added a commit that referenced this pull request Aug 21, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Aug 21, 2026
[ghstack-poisoned]
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Sep 30, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 5, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 7, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 9, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 14, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 16, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 20, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Oct 26, 2026
@pytorchgreenlight pytorchgreenlight Bot added the GL/human GreenLight marked as needing human review label Oct 27, 2026
[ghstack-poisoned]
jbschlosser added a commit that referenced this pull request Nov 10, 2026
@jbschlosser

Copy link
Copy Markdown
Contributor Author

Better ways to handle this coming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GL/human GreenLight marked as needing human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant