Skip to content

[jit] Fix ResolutionCallback definition#51089

Closed
malfet wants to merge 1 commit intomasterfrom
malfet/fix-ResolutionCallback-definition
Closed

[jit] Fix ResolutionCallback definition#51089
malfet wants to merge 1 commit intomasterfrom
malfet/fix-ResolutionCallback-definition

Conversation

@malfet
Copy link
Copy Markdown
Contributor

@malfet malfet commented Jan 26, 2021

ResolutionCallback returns py::object (i.e. Any) rather than py::function (i.e. Callable)

Discovered while debugging test failures after updating pybind11

This also makes resolution code slightly faster, as it eliminates casts from object to function and back for every py::object obj = rcb_(name); statement.

`ResolutionCallback` returns `py::object` (i.e. `Any`) rather than `py::function` (i.e. `Callable`)

Discovered while debugging test failures after updating pybind11

This also makes resoution code slightly faster, as it eliminates casts from object to function and back for every `py::object obj = rcb_(name);` statement.
@malfet malfet requested review from a team, albanD and jamesr66a January 26, 2021 05:09
@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Jan 26, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

facebook-github-bot commented Jan 26, 2021

💊 CI failures summary and remediations

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


  • 2/2 failures possibly* introduced in this PR
    • 2/2 non-CircleCI 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.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 26, 2021

Codecov Report

Merging #51089 (a720b24) into master (789f6f1) will decrease coverage by 0.06%.
The diff coverage is 27.96%.

@@            Coverage Diff             @@
##           master   #51089      +/-   ##
==========================================
- Coverage   80.97%   80.90%   -0.07%     
==========================================
  Files        1919     1924       +5     
  Lines      209785   210014     +229     
==========================================
+ Hits       169875   169921      +46     
- Misses      39910    40093     +183     

Comment thread torch/csrc/jit/python/script_init.cpp
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@malfet merged this pull request in 3119475.

@malfet malfet deleted the malfet/fix-ResolutionCallback-definition branch January 26, 2021 17:56
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
`ResolutionCallback` returns `py::object` (i.e. `Any`) rather than `py::function` (i.e. `Callable`)

Discovered while debugging test failures after updating pybind11

This also makes resolution code slightly faster, as it eliminates casts from object to function and back for every `py::object obj = rcb_(name);` statement.

Pull Request resolved: pytorch#51089

Reviewed By: jamesr66a

Differential Revision: D26069295

Pulled By: malfet

fbshipit-source-id: 6876caf9b4653c8dc8e568aefb6778895decea05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants