Skip to content
Permalink
Browse files Browse the repository at this point in the history
Prevent yet another division by zero
PiperOrigin-RevId: 369343977
Change-Id: I1a60da4cf512e60fd91e069c16e026544632fe7f
  • Loading branch information
mihaimaruseac authored and tensorflower-gardener committed Apr 20, 2021
1 parent b40060c commit 2be2cdf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tensorflow/core/kernels/conv_grad_input_ops.h
Expand Up @@ -649,6 +649,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 2be2cdf

Please sign in to comment.