diff options
Diffstat (limited to 'tensorflow/core/grappler/clusters/cluster.cc')
-rw-r--r-- | tensorflow/core/grappler/clusters/cluster.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tensorflow/core/grappler/clusters/cluster.cc b/tensorflow/core/grappler/clusters/cluster.cc index 8d8c6084ec..6d84283e68 100644 --- a/tensorflow/core/grappler/clusters/cluster.cc +++ b/tensorflow/core/grappler/clusters/cluster.cc @@ -29,6 +29,14 @@ void Cluster::AllowSoftPlacement(bool soft_placement_state) { options_.config.set_allow_soft_placement(soft_placement_state); } +void Cluster::SetNumInterOpThreads(int num_threads) { + for (int i = 0; i < options_.config.session_inter_op_thread_pool_size(); + ++i) { + options_.config.mutable_session_inter_op_thread_pool(i)->set_num_threads( + num_threads); + } +} + void Cluster::SetNumWarmupSteps(int num_steps) { options_.config.mutable_graph_options()->set_build_cost_model_after( num_steps); |