KEMBAR78
[reland] Allow Future::then to return pre-extracted DataPtrs by lw · Pull Request #59207 · pytorch/pytorch · GitHub
Skip to content

Conversation

@lw
Copy link
Contributor

@lw lw commented May 31, 2021

Stack from ghstack:

Reland of #58424

In CUDA mode, Future must inspect its value and extract DataPtrs. However some types are not supported, for example the C++/JIT custom classes, which include Message, which is widely used in RPC. Hence for these scenarios we allow the user to perform the custom DataPtr extraction on their own, and pass the pre-extracted DataPtrs.

Note that markCompleted already allowed users to pass in pre-extracted DataPtrs, hence this PR simply extends this possibility to the then method too.

Differential Revision: D28623890

Reland of #58424

In CUDA mode, Future must inspect its value and extract DataPtrs. However some types are not supported, for example the C++/JIT custom classes, which include Message, which is widely used in RPC. Hence for these scenarios we allow the user to perform the custom DataPtr extraction on their own, and pass the pre-extracted DataPtrs.

Note that `markCompleted` already allowed users to pass in pre-extracted DataPtrs, hence this PR simply extends this possibility to the `then` method too.

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

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

facebook-github-bot commented May 31, 2021

💊 CI failures summary and remediations

As of commit 056bf4e (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.

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.

reviewed the previous attempt. The change in reland is updating internal related code to use intrusive_ptr as well.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1adc289.

@facebook-github-bot facebook-github-bot deleted the gh/lw/195/head branch June 5, 2021 14:17
deniskokarev pushed a commit to deniskokarev/pytorch that referenced this pull request Jun 9, 2021
…#59207)

Summary:
Pull Request resolved: pytorch#59207

Reland of pytorch#58424

In CUDA mode, Future must inspect its value and extract DataPtrs. However some types are not supported, for example the C++/JIT custom classes, which include Message, which is widely used in RPC. Hence for these scenarios we allow the user to perform the custom DataPtr extraction on their own, and pass the pre-extracted DataPtrs.

Note that `markCompleted` already allowed users to pass in pre-extracted DataPtrs, hence this PR simply extends this possibility to the `then` method too.
ghstack-source-id: 130202846

Test Plan: Used in next PR.

Reviewed By: mrshenli

Differential Revision: D28623890

fbshipit-source-id: 468c5308b40774ba0a778b195add0e0845c1929e
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