-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[dynamo] Properly handle super().some_classmethod(...)
#151060
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151060
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 5de2dae with merge base 1a1a32c ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Apr 10, 2025
Skylion007
approved these changes
Apr 11, 2025
mlazos
approved these changes
Apr 14, 2025
anijain2305
approved these changes
Apr 14, 2025
Starting merge as part of PR stack under #151062 |
pytorchmergebot
pushed a commit
that referenced
this pull request
Apr 15, 2025
…n__` (#151061) As title, this patch fixes bugs in 1. emulating `has_torch_function` 2. emulating calling `__torch_function__` 3. building a callable VT for non-classmethod `__torch_function__` Fixes #120799, #150265, #150848. Pull Request resolved: #151061 Approved by: https://github.com/anijain2305, https://github.com/mlazos ghstack dependencies: #151060
pytorchmergebot
pushed a commit
that referenced
this pull request
Apr 15, 2025
Since #149792 deprecates `traceable_tensor_subclasses` and it's been landed for over a week, we can safely remove all the old code that uses `traceable_tensor_subclasses` (they were primarily for testing purposes and are equivalent to no-ops now). Pull Request resolved: #151062 Approved by: https://github.com/mlazos, https://github.com/anijain2305 ghstack dependencies: #151060, #151061
timocafe
pushed a commit
to timocafe/pytorch
that referenced
this pull request
Apr 16, 2025
) Previously we were passing in the instance as first argument to a `super().some_classmethod(...)` call, but we should've passed in the type object instead, per semantics of `@classmethod`. Pull Request resolved: pytorch#151060 Approved by: https://github.com/Skylion007, https://github.com/mlazos, https://github.com/anijain2305
timocafe
pushed a commit
to timocafe/pytorch
that referenced
this pull request
Apr 16, 2025
…n__` (pytorch#151061) As title, this patch fixes bugs in 1. emulating `has_torch_function` 2. emulating calling `__torch_function__` 3. building a callable VT for non-classmethod `__torch_function__` Fixes pytorch#120799, pytorch#150265, pytorch#150848. Pull Request resolved: pytorch#151061 Approved by: https://github.com/anijain2305, https://github.com/mlazos ghstack dependencies: pytorch#151060
timocafe
pushed a commit
to timocafe/pytorch
that referenced
this pull request
Apr 16, 2025
…51062) Since pytorch#149792 deprecates `traceable_tensor_subclasses` and it's been landed for over a week, we can safely remove all the old code that uses `traceable_tensor_subclasses` (they were primarily for testing purposes and are equivalent to no-ops now). Pull Request resolved: pytorch#151062 Approved by: https://github.com/mlazos, https://github.com/anijain2305 ghstack dependencies: pytorch#151060, pytorch#151061
amathewc
pushed a commit
to amathewc/pytorch
that referenced
this pull request
Apr 17, 2025
) Previously we were passing in the instance as first argument to a `super().some_classmethod(...)` call, but we should've passed in the type object instead, per semantics of `@classmethod`. Pull Request resolved: pytorch#151060 Approved by: https://github.com/Skylion007, https://github.com/mlazos, https://github.com/anijain2305
amathewc
pushed a commit
to amathewc/pytorch
that referenced
this pull request
Apr 17, 2025
…n__` (pytorch#151061) As title, this patch fixes bugs in 1. emulating `has_torch_function` 2. emulating calling `__torch_function__` 3. building a callable VT for non-classmethod `__torch_function__` Fixes pytorch#120799, pytorch#150265, pytorch#150848. Pull Request resolved: pytorch#151061 Approved by: https://github.com/anijain2305, https://github.com/mlazos ghstack dependencies: pytorch#151060
amathewc
pushed a commit
to amathewc/pytorch
that referenced
this pull request
Apr 17, 2025
…51062) Since pytorch#149792 deprecates `traceable_tensor_subclasses` and it's been landed for over a week, we can safely remove all the old code that uses `traceable_tensor_subclasses` (they were primarily for testing purposes and are equivalent to no-ops now). Pull Request resolved: pytorch#151062 Approved by: https://github.com/mlazos, https://github.com/anijain2305 ghstack dependencies: pytorch#151060, pytorch#151061
Divigroup-RAP
pushed a commit
to Divigroup-RAP/PYTORCH
that referenced
this pull request
Apr 22, 2025
Previously we were passing in the instance as first argument to a `super().some_classmethod(...)` call, but we should've passed in the type object instead, per semantics of `classmethod`. ghstack-source-id: 7ac6b8a Pull Request resolved: pytorch/pytorch#151060
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
traceable_tensor_subclasses
-related code #151062__torch_function__
#151061super().some_classmethod(...)
#151060Previously we were passing in the instance as first argument to a
super().some_classmethod(...)
call, but we should've passed in thetype object instead, per semantics of
@classmethod
.cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames