Skip to content

Conversation

ezyang
Copy link
Contributor

@ezyang ezyang commented Aug 3, 2021

Stack from ghstack:

It turns out that it is occasionally useful to be able to access the
PyInterpreter object from other Python bindings (see next diff in the
stack). Make it publicly available.

Signed-off-by: Edward Z. Yang ezyang@fb.com

Differential Revision: D30074926

It turns out that it is occasionally useful to be able to access the
PyInterpreter object from other Python bindings (see next diff in the
stack).  Make it publicly available.

Signed-off-by: Edward Z. Yang <ezyang@fb.com>

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 3, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 40aafaa (more details on the Dr. CI page):


  • 1/10 failures introduced in this PR
  • 9/10 broken upstream at merge base 3d2fe32 on Aug 03 from 10:12am to 11:48am

1 failure not recognized by patterns:

Job Step Action
GitHub Actions Lint / mypy Run mypy 🔁 rerun

🚧 9 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

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 ezyang requested a review from bdhirsh August 3, 2021 17:31
@ezyang
Copy link
Contributor Author

ezyang commented Aug 3, 2021

@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

return THPVariable_Unpack(reinterpret_cast<THPVariable*>(obj));
}

THP_API c10::impl::PyInterpreter* getPyInterpreter();
Copy link
Contributor

@bdhirsh bdhirsh Aug 3, 2021

Choose a reason for hiding this comment

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

How is THP_API different from TORCH_API? (and why do we want it here?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's the one for stuff in torch_python, which this file is in

@facebook-github-bot
Copy link
Contributor

@ezyang merged this pull request in 5e5de75.

@facebook-github-bot facebook-github-bot deleted the gh/ezyang/1052/head branch August 10, 2021 14:17
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.

4 participants