提交 cf352862 编写于 作者: A A. Unique TensorFlower 提交者: TensorFlower Gardener

Added a FLAG to third_party/tensorflow/core/grappler/clusters/single_machine.cc

that allows users' models to fall back to run CPUs when there is no GPU
implementation for some particular ops.
Change: 150101066
上级 da99ab57
......@@ -116,6 +116,11 @@ Status SingleMachine::Run(const GraphDef& graph_def,
return RunWithTimeout(feed, fetch, metadata);
}
Status SingleMachine::AllowSoftPlacement(bool soft_placement_state) {
options_.config.set_allow_soft_placement(soft_placement_state);
return Status::OK();
}
Status SingleMachine::RunWithTimeout(
const std::vector<std::pair<string, Tensor>>& feed,
const std::vector<string>& fetch, RunMetadata* run_metadata) {
......
......@@ -37,6 +37,7 @@ class SingleMachine : public Cluster {
const std::vector<std::pair<string, Tensor>>& feed,
const std::vector<string>& fetch, RunMetadata* metadata) override;
Status AllowSoftPlacement(bool soft_placement_state);
private:
Status RunWithTimeout(const std::vector<std::pair<string, Tensor>>& feed,
const std::vector<string>& fetch,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册