Skip to content

Conversation

@wanchaol
Copy link
Collaborator

@wanchaol wanchaol commented Aug 14, 2020

Stack from ghstack:

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: D23252039

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

[ghstack-poisoned]
wanchaol added a commit that referenced this pull request Aug 14, 2020
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

ghstack-source-id: edc7e7d
Pull Request resolved: #43043
@facebook-github-bot facebook-github-bot added the oncall: jit Add this issue/PR to JIT oncall triage queue label Aug 14, 2020
@dr-ci
Copy link

dr-ci bot commented Aug 14, 2020

💊 CI failures summary and remediations

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


  • 3/3 failures possibly* introduced in this PR
    • 3/3 non-CircleCI failure(s)

Extra GitHub checks: 1 failed


ci.pytorch.org: 1 failed


codecov.io: 1 failed


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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 56 times.

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

[ghstack-poisoned]
wanchaol added a commit that referenced this pull request Aug 14, 2020
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

ghstack-source-id: 8fa8b48
Pull Request resolved: #43043
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

[ghstack-poisoned]
Copy link
Contributor

@mrshenli mrshenli left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding this!

It will be great if we can also cover the case where user function throws, but it can be added in follow up PRs.

py::module::import("torch.distributed.rpc").attr("rpc_async").ptr()) {
return SpecialFormValue::create(prim::rpc_async);
} else if (
// RPC module is only avaialble when build flag "USE_DISTRIBUTED" is on.
Copy link
Contributor

Choose a reason for hiding this comment

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

redundant space after "available"

} else if (
// RPC module is only avaialble when build flag "USE_DISTRIBUTED" is on.
obj.ptr() ==
py::module::import("torch.distributed.rpc").attr("rpc_sync").ptr()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

is the indent here intentional?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's formatted by clang-format (and stay aligned with the above rpc_async op)

Comment on lines 148 to 149
futureIValuePtr->wait();
auto res = futureIValuePtr->value();
Copy link
Contributor

Choose a reason for hiding this comment

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

These could throw error. Is that OK?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good catch! handled the error.

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

[ghstack-poisoned]
@codecov
Copy link

codecov bot commented Sep 10, 2020

Codecov Report

Merging #43043 into gh/wanchaol/121/base will increase coverage by 0.00%.
The diff coverage is 21.42%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           gh/wanchaol/121/base   #43043   +/-   ##
=====================================================
  Coverage                 68.05%   68.06%           
=====================================================
  Files                       382      382           
  Lines                     49468    49461    -7     
=====================================================
  Hits                      33667    33667           
+ Misses                    15801    15794    -7     
Impacted Files Coverage Δ
.../testing/_internal/distributed/rpc/jit/rpc_test.py 29.53% <21.42%> (+0.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2eeacb...0565576. Read the comment docs.

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Differential Revision: [D23252039](https://our.internmc.facebook.com/intern/diff/D23252039)

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

@wanchaol merged this pull request in 3e5df5f.

@facebook-github-bot facebook-github-bot deleted the gh/wanchaol/121/head branch September 15, 2020 14:17
xuzhao9 pushed a commit that referenced this pull request Sep 18, 2020
Summary:
Pull Request resolved: #43043

This add the support for rpc_sync in TorchScript in a way similar to
rpc_async

Test Plan: Imported from OSS

Reviewed By: mrshenli

Differential Revision: D23252039

Pulled By: wanchaol

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

Labels

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.

5 participants