Skip to content

Conversation

@mrshenli
Copy link
Contributor

@mrshenli mrshenli commented Nov 12, 2019

Stack from ghstack:

This implementation supports rpc.remote to self by doing the
following steps:

  1. create an owner RRef
  2. add the owner RRef to owners_ in RRefContext, and keep it alive
    by using RRefId as the ForkId.
  3. Go through serde and insert the message to the caller's thread-pool
  4. When the response message gets processed, remove the itself from
    RRef fork map.

Differential Revision: D18445812

This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

[ghstack-poisoned]
@mrshenli mrshenli requested a review from pietern as a code owner November 12, 2019 05:10
mrshenli added a commit that referenced this pull request Nov 12, 2019
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

ghstack-source-id: 059f92c
Pull Request resolved: #29634
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
mrshenli added a commit that referenced this pull request Nov 12, 2019
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

ghstack-source-id: b82716e
Pull Request resolved: #29634
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
mrshenli added a commit that referenced this pull request Nov 12, 2019
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

ghstack-source-id: af17a12
Pull Request resolved: #29634
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
Copy link
Contributor

@aazzolini aazzolini left a comment

Choose a reason for hiding this comment

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

Looks good. In the future we should probably bypass serialization and deserialization and simply short-circuit the local call, but that will require access to the thread pool.

This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

[ghstack-poisoned]
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

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

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

@mrshenli merged this pull request in 4a1fcc0.

@facebook-github-bot facebook-github-bot deleted the gh/mrshenli/50/head branch November 17, 2019 15:15
csarofeen pushed a commit to mruberry/pytorch that referenced this pull request Nov 18, 2019
Summary:
Pull Request resolved: pytorch#29634

This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

Test Plan: Imported from OSS

Differential Revision: D18445812

Pulled By: mrshenli

fbshipit-source-id: e3b9aa98962c388acbc2ce294101a236d5cb2da6
xxtEchjovs44 pushed a commit to xxtEchjovs44/pytorch that referenced this pull request Jan 29, 2020
This implementation supports rpc.remote to self by doing the
following steps:

1. create an owner RRef
2. add the owner RRef to owners_ in RRefContext, and keep it alive
   by using RRefId as the ForkId.
3. Go through serde and insert the message to the caller's thread-pool
4. When the response message gets processed, remove the itself from
   RRef fork map.

ghstack-source-id: 582163d
Pull Request resolved: pytorch/pytorch#29634
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants