diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-07-31 23:18:58 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-31 23:23:48 -0700 |
commit | 26ba623dccacfb2f913951e12089a8340e6a11ac (patch) | |
tree | bfa67abb9eb1d408bb1a4a52b8c7c5c3d470b00f /tensorflow/compiler/xla/service/hlo_instruction.h | |
parent | 92279f8bfa6ce2124439aabfa6db84d722dc2b66 (diff) |
Cleanup the sharding unique device API.
PiperOrigin-RevId: 206885051
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_instruction.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_instruction.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_instruction.h b/tensorflow/compiler/xla/service/hlo_instruction.h index 70441b879d..0e3130a05c 100644 --- a/tensorflow/compiler/xla/service/hlo_instruction.h +++ b/tensorflow/compiler/xla/service/hlo_instruction.h @@ -1014,9 +1014,7 @@ class HloInstruction { if (sharding_ == nullptr) { return tensorflow::gtl::optional<int64>(); } - auto device = sharding_->UniqueDevice(); - return device.ok() ? device.ValueOrDie() - : tensorflow::gtl::optional<int64>(); + return sharding_->UniqueDevice(); } // Sets the sharding of this operator. Should only be called by HloModule or // HloComputation methods. |