From 17695212ccaffd214e1cc4f929afaa22dfb1d4c9 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 30 Oct 2017 20:49:51 -0700 Subject: [PATCH] [TF:XLA] Don't pass HLO operands in HandleAtan2. This makes it consistent with the rest of the Visit methods where we only pass the HLO itself. PiperOrigin-RevId: 173990595 --- tensorflow/compiler/xla/service/dfs_hlo_visitor.h | 6 +----- tensorflow/compiler/xla/service/hlo_instruction.cc | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/tensorflow/compiler/xla/service/dfs_hlo_visitor.h b/tensorflow/compiler/xla/service/dfs_hlo_visitor.h index e57a492dde5..237cd8c31de 100644 --- a/tensorflow/compiler/xla/service/dfs_hlo_visitor.h +++ b/tensorflow/compiler/xla/service/dfs_hlo_visitor.h @@ -52,9 +52,6 @@ class HloInstruction; // "unimplemented" error status. // // Note: this may change to an iterator in the future for flexibility purposes. -// -// TODO(b/26548304): Stop passing in information about the visited -// instruction that is accessible from the instruction object itself. class DfsHloVisitor { public: DfsHloVisitor() {} @@ -110,8 +107,7 @@ class DfsHloVisitor { virtual Status HandleAbs(HloInstruction* abs) { return HandleElementwiseUnary(abs); } - virtual Status HandleAtan2(HloInstruction* atan2, HloInstruction* y, - HloInstruction* x) { + virtual Status HandleAtan2(HloInstruction* atan2) { return HandleElementwiseBinary(atan2); } virtual Status HandleRound(HloInstruction* round) { diff --git a/tensorflow/compiler/xla/service/hlo_instruction.cc b/tensorflow/compiler/xla/service/hlo_instruction.cc index b1bfd3e6747..e6a4f68fb38 100644 --- a/tensorflow/compiler/xla/service/hlo_instruction.cc +++ b/tensorflow/compiler/xla/service/hlo_instruction.cc @@ -2131,7 +2131,7 @@ Status HloInstruction::Visit(DfsHloVisitor* visitor) { case HloOpcode::kAbs: return visitor->HandleAbs(this); case HloOpcode::kAtan2: - return visitor->HandleAtan2(this, operands_[0], operands_[1]); + return visitor->HandleAtan2(this); case HloOpcode::kRoundNearestAfz: return visitor->HandleRound(this); case HloOpcode::kBatchNormTraining: