Skip to content

Relax tp_new so that it is OK to call#57544

Closed
ezyang wants to merge 2 commits into
gh/ezyang/1025/basefrom
gh/ezyang/1025/head
Closed

Relax tp_new so that it is OK to call#57544
ezyang wants to merge 2 commits into
gh/ezyang/1025/basefrom
gh/ezyang/1025/head

Conversation

@ezyang
Copy link
Copy Markdown
Contributor

@ezyang ezyang commented May 4, 2021

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

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]
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented May 4, 2021

💊 CI failures summary and remediations

As of commit 7aca09a (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

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.

Click here to manually regenerate this comment.

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
@ezyang ezyang requested a review from colesbury May 4, 2021 14:53
Copy link
Copy Markdown
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@ezyang merged this pull request in da8cc35.

@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1025/head branch May 9, 2021 14:17
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants