diff options
author | HyoukJoong Lee <hyouklee@google.com> | 2018-05-30 18:43:40 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-05-30 18:46:21 -0700 |
commit | d0f9424e22eb438f3d846fa62feaf331797e62c4 (patch) | |
tree | 74c07877c136cc180503e85ad3e81dc51219552b /tensorflow/compiler/xla/service/hlo_module_group_metadata.cc | |
parent | 1479382c92d371843199ec6eb888b05609bf288f (diff) |
Automated g4 rollback of changelist 195379693
PiperOrigin-RevId: 198654780
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_module_group_metadata.cc')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_module_group_metadata.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_module_group_metadata.cc b/tensorflow/compiler/xla/service/hlo_module_group_metadata.cc index 7d706b5fd0..f6fa45a6b7 100644 --- a/tensorflow/compiler/xla/service/hlo_module_group_metadata.cc +++ b/tensorflow/compiler/xla/service/hlo_module_group_metadata.cc @@ -247,6 +247,13 @@ tensorflow::gtl::optional<int64> HloModuleGroupMetadata::GetInstructionDevice( return device; } +int64 HloModuleGroupMetadata::GetDeviceModulesCount() const { + return std::count_if(modules_.begin(), modules_.end(), + [](const HloModule* module) { + return !module->config().is_host_module(); + }); +} + Status HloModuleGroupMetadata::RecordInstructions() { const auto visitor = [this](HloInstruction* hlo) -> Status { if (hlo->opcode() == HloOpcode::kWhile) { |