Skip to content

Add Future to IValue#12976

Closed
highker wants to merge 1 commit intopytorch:masterfrom
highker:future-ivalue
Closed

Add Future to IValue#12976
highker wants to merge 1 commit intopytorch:masterfrom
highker:future-ivalue

Conversation

@highker
Copy link
Copy Markdown

@highker highker commented Oct 23, 2018

Future now is an IValue. prim::Wait now is replaced by aten::wait

This PR is built on top of #12925

@highker highker requested review from jamesr66a and zdevito October 23, 2018 02:49
Copy link
Copy Markdown
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

Cool! Thanks for updating the way emitApplyExpr works. I put some comments in about actually generating the inner Graph for the fork node.

Comment thread aten/src/ATen/core/interned_strings.h Outdated

This comment was marked as off-topic.

Comment thread aten/src/ATen/core/ivalue.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/async.h Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/graph_executor.h Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/interpreter.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

@highker
Copy link
Copy Markdown
Author

highker commented Oct 25, 2018

@zdevito comments addressed; thanks for review!

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.

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

@yf225
Copy link
Copy Markdown
Contributor

yf225 commented Oct 26, 2018

@pytorchbot retest this please

Copy link
Copy Markdown
Contributor

@zdevito zdevito left a comment

Choose a reason for hiding this comment

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

Cool! I have a few minor things, but they should be easy to fix.

Comment thread torch/csrc/jit/init.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/register_prim_ops.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/register_prim_ops.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.cpp Outdated

This comment was marked as off-topic.

Comment thread torch/csrc/jit/script/compiler.h Outdated

This comment was marked as off-topic.

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.

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

Add two new functions for jit script: fork and wait. fork takes a
function name together with a list of inputs and returns a future. wait
takes a future and return the value of the function result evaluated on
the tuple of inputs. This patch only introduces the syntax without a real
fork or wait. The fork will eagerly execute the function it takes and
wait is a dummy function doing nothing.
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.

highker is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Oct 27, 2018
Summary:
Future now is an IValue. prim::Wait now is replaced by aten::wait

This PR is built on top of #12925
Pull Request resolved: pytorch/pytorch#12976

Differential Revision: D10861483

Pulled By: highker

fbshipit-source-id: 9e17926a625bc502fb12335ef9ce819f25776be7
@ezyang ezyang added the merged label Jun 25, 2019
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Summary:
Future now is an IValue. prim::Wait now is replaced by aten::wait

This PR is built on top of pytorch#12925
Pull Request resolved: pytorch#12976

Differential Revision: D10861483

Pulled By: highker

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants