-
Notifications
You must be signed in to change notification settings - Fork 25.2k
symintify rand and randint functions and meta suport for randint #86358
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/86358
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 FailuresAs of commit 561a01e: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds ok to me but would like a double check from Ed
c10::impl::ExcludeDispatchKeyGuard guard(DispatchKey::FuncTorchVmapMode); | ||
auto maybe_layer = maybeCurrentDynamicLayer(); | ||
VmapDimVector shapeVec(1, maybe_layer->batchSize()); | ||
c10::SmallVector<SymInt> shapeVec(1, maybe_layer->batchSize()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is ok given @ezyang 's latest ambitions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use SymDimVector instead, but this is fine, I gave up on changing SymIntArrayRef
torch/_meta_registrations.py
Outdated
@@ -80,6 +80,9 @@ def meta_randperm(n, *, generator=None, out): | |||
assert out.ndim == 1 and out.size(0) == n | |||
return out | |||
|
|||
@register_meta(aten.randint.default) | |||
def meta_randperm(high, size, dtype, layout, device, pin_memory): | |||
return torch.empty(size, dtype=dtype, device=device) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not pass layout and pin memory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah that needs to be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one idiom for factory functions is to just pass along the entire **kwargs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the kwarg update otherwise LGTM !
…andint" [ghstack-poisoned]
…andint" [ghstack-poisoned]
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: The following mandatory check(s) failed (Rule Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
…andint" [ghstack-poisoned]
…andint" [ghstack-poisoned]
…andint" [ghstack-poisoned]
…andint" [ghstack-poisoned]
…andint" [ghstack-poisoned]
@pytorchbot merge -g |
Merge startedYour change will be merged once all checks on your PR pass since you used the green (-g) flag (ETA: 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 2 additional jobs have failed, first few of them are: trunk ,trunk / linux-focal-rocm5.2-py3.7 / test (default, 2, 2, linux.rocm.gpu) Details for Dev Infra teamRaised by workflow job |
@pytorchbot merge -f "unrelated rocm failure" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Hey @anjali411. |
ghstack-source-id: 559ca23 Pull Request resolved: pytorch/pytorch#86358
Stack from ghstack (oldest at bottom):