-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Future interface for ATen/Parallel #21764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Adding std::future interface into ATen/Parallel for convenience
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
ilia-cher
commented
Jun 14, 2019
aten/src/ATen/ParallelNative.cpp
Outdated
|
||
std::future<void> intraop_launch_future(std::function<void()> func) { | ||
auto func_promise = std::make_shared<std::promise<void>>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::function requires the functor to be copyable, so, unfortunately, we cannot just move std::promise into lambda
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
cpuhrsch
reviewed
Jun 17, 2019
cpuhrsch
reviewed
Jun 17, 2019
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
cpuhrsch
reviewed
Jun 17, 2019
cpuhrsch
approved these changes
Jun 17, 2019
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
Future interface for ATen/Parallel Summary: Adding std::future interface into ATen/Parallel for convenience gh-metadata: pytorch pytorch 21764 gh/ilia-cher/28/head
using ivalue::Future |
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Jun 18, 2019
Summary: Pull Request resolved: pytorch/pytorch#21764 ghimport-source-id: fca083c09d814a0411020871f49429509fc0e8b5 Test Plan: Imported from OSS see pytorch/pytorch#21764 Differential Revision: D15816658 Pulled By: ilia-cher fbshipit-source-id: 0e25ca6ff66a837d4f69f37a47e59927ab10e216
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
module: internals
Related to internal abstractions in c10 and ATen
module: openmp
Related to OpenMP (omp) support in PyTorch
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
Summary:
Adding std::future interface into ATen/Parallel for convenience
Test:
PARALLEL_BACKEND=NATIVE USE_CUDA=0 BLAS=MKL USE_MKLDNN=1 BUILD_BINARY=1 python setup.py develop --cmake
./build/bin/test_parallel
PARALLEL_BACKEND=OPENMP USE_CUDA=0 BLAS=MKL USE_MKLDNN=1 BUILD_BINARY=1 python setup.py develop --cmake
./build/bin/test_parallel
PARALLEL_BACKEND=NATIVE_TBB USE_TBB=1 USE_CUDA=0 BLAS=MKL USE_MKLDNN=1 BUILD_BINARY=1 python setup.py develop --cmake
./build/bin/test_parallel
Differential Revision: D15816658