Relax tp_new so that it is OK to call#57544
Closed
ezyang wants to merge 2 commits into
Closed
Conversation
Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes #57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> [ghstack-poisoned]
Contributor
💊 CI failures summary and remediationsAs of commit 7aca09a (more details on the Dr. CI page):
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
ezyang
added a commit
that referenced
this pull request
May 4, 2021
Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes #57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: 4757b1e Pull Request resolved: #57544
Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes #57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: [D28189475](https://our.internmc.facebook.com/intern/diff/D28189475) [ghstack-poisoned]
ezyang
added a commit
that referenced
this pull request
May 4, 2021
Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes #57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> ghstack-source-id: 690cc65 Pull Request resolved: #57544
Contributor
krshrimali
pushed a commit
to krshrimali/pytorch
that referenced
this pull request
May 19, 2021
Summary: Pull Request resolved: pytorch#57544 Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes pytorch#57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D28189475 Pulled By: ezyang fbshipit-source-id: 9397a3842a77f5428d182dd62244b42425bca827
laurentdupin
pushed a commit
to laurentdupin/pytorch
that referenced
this pull request
Apr 25, 2026
Summary: Pull Request resolved: pytorch#57544 Instead of removing tp_new from the superclass (which causes super().__new__ to not work), I now still install tp_new on the superclass, but verify that you are not trying to directly construct _TensorBase. Fixes pytorch#57421 Signed-off-by: Edward Z. Yang <ezyang@fb.com> Test Plan: Imported from OSS Reviewed By: albanD Differential Revision: D28189475 Pulled By: ezyang fbshipit-source-id: 9397a3842a77f5428d182dd62244b42425bca827
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
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:
Instead of removing tp_new from the superclass (which causes
super().new to not work), I now still install tp_new on the
superclass, but verify that you are not trying to directly
construct _TensorBase.
Fixes #57421
Signed-off-by: Edward Z. Yang ezyang@fb.com
Differential Revision: D28189475