diff options
author | Vijay Vasudevan <vrv@google.com> | 2016-05-02 19:40:48 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-05-02 20:51:32 -0700 |
commit | ac959c8a942b4f9202dbd6d8bffc6fcf7b096695 (patch) | |
tree | 3bf14f1a93dbf9ae15df9ed280656a381a73a68a /tensorflow/core/common_runtime/simple_placer.h | |
parent | 0f70b8e4b72109a2f99a6235da2f17ec142040ad (diff) |
TensorFlow: Move assignment / choice of device in SimplePlacer out of
AssignDevice and into the main loop, for a future refactor where we
inject the choice of algorithm to use when selecting a device for a node.
Currently this continues to use just the first device in the list,
but we would like to be able to play around with algorithms that choose
alternative strategies, perhaps based on other heuristics and runtime
information. SimplePlacer remains the code that does performs the
precondition filters (hard-device assignment and validation), so that
other placement algorithms don't have to worry about enforcing the correct
assignments / conditions.
Change: 121339923
Diffstat (limited to 'tensorflow/core/common_runtime/simple_placer.h')
-rw-r--r-- | tensorflow/core/common_runtime/simple_placer.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/simple_placer.h b/tensorflow/core/common_runtime/simple_placer.h index 0fcaa31e6f..7bfd5a1311 100644 --- a/tensorflow/core/common_runtime/simple_placer.h +++ b/tensorflow/core/common_runtime/simple_placer.h @@ -43,7 +43,10 @@ namespace tensorflow { // The implementation builds a constraint graph with the same set of // nodes, and edges that represent colocation constraints between // nodes. Each connected component in the resulting constraint graph -// is then assigned to a single device. +// is then assigned to a set of valid devices. +// +// Run() will finally assign the device to each node given the list of +// possible devices. // // TODO(mrry): "Soft" constraints, such as "place node 'x' as close as // possible to node 'y' while respecting the other constraints"? |