Skip to content

Commit

Permalink
Merge pull request #49953 from tensorflow/cp2_1_369343977
Browse files Browse the repository at this point in the history
Prevent yet another division by zero
  • Loading branch information
mihaimaruseac committed Jun 2, 2021
2 parents 657e015 + 5995075 commit b4b2d71
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tensorflow/core/kernels/conv_grad_input_ops.cc
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ class Conv2DCustomBackpropInputOp : public OpKernel {
dims.batch_size == 1 ||
thread_work_unit_size >= min_thread_work_unit_size;

OP_REQUIRES(
context, work_unit_size > 0,
errors::InvalidArgument("input, filter_sizes and out_backprop tensors "
"must all have at least 1 element"));

const size_t shard_size =
use_parallel_contraction
? 1
Expand Down

0 comments on commit b4b2d71

Please sign in to comment.