diff options
author | 2018-06-28 05:24:28 -0700 | |
---|---|---|
committer | 2018-06-28 05:27:30 -0700 | |
commit | 85d3356b4afe3dee1ea890bd2acdeca44537c428 (patch) | |
tree | 92ef05ace02c450f3ea154aa3256037ae60a0448 /tensorflow/compiler | |
parent | ddc01636d01b338e32c6ff07c22b78840cddd56a (diff) |
[tf2xla] Return zero-element tensors as tokens from FusedBatchNormGrad
We returned one-element tensors with uninitialized content, which msan didn't like.
PiperOrigin-RevId: 202463090
Diffstat (limited to 'tensorflow/compiler')
-rw-r--r-- | tensorflow/compiler/tf2xla/kernels/batch_norm_op.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/compiler/tf2xla/kernels/batch_norm_op.cc b/tensorflow/compiler/tf2xla/kernels/batch_norm_op.cc index 259fe05b09..c4af79281d 100644 --- a/tensorflow/compiler/tf2xla/kernels/batch_norm_op.cc +++ b/tensorflow/compiler/tf2xla/kernels/batch_norm_op.cc @@ -192,8 +192,8 @@ class FusedBatchNormGradOp : public XlaOpKernel { XlaHelpers::ConvertElementType(b, x_backprop, input_dtype)); ctx->SetOutput(1, scale_backprop); ctx->SetOutput(2, offset_backprop); - ctx->SetConstantOutput(3, Tensor(scale_dtype, {})); - ctx->SetConstantOutput(4, Tensor(scale_dtype, {})); + ctx->SetConstantOutput(3, Tensor()); + ctx->SetConstantOutput(4, Tensor()); } private: |