Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix FPE issue in external Eigen source code issue with `tf.raw_ops.Sp…
…arseMatMul`.

PiperOrigin-RevId: 370992919
Change-Id: Icfb276fef5fb40928b27c3e44608d2aca72c9fd7
  • Loading branch information
Amit Patankar authored and tensorflower-gardener committed Apr 28, 2021
1 parent 05a63e6 commit 7f283ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tensorflow/core/kernels/sparse_matmul_op.cc
Expand Up @@ -1039,6 +1039,10 @@ class SparseMatMulOp : public OpKernel {
if (transpose_b) {
// TODO(agarwal): avoid transposing the matrix here and directly handle
// transpose in CreateDenseSlices.
OP_REQUIRES(ctx, right->dim_size(0) != 0,
errors::InvalidArgument("b has an entry 0 in it's shape."));
OP_REQUIRES(ctx, right->dim_size(1) != 0,
errors::InvalidArgument("b has an entry 0 in it's shape."));
right_tr.reset(
new Tensor(right->dtype(),
TensorShape({right->dim_size(1), right->dim_size(0)})));
Expand Down

0 comments on commit 7f283ff

Please sign in to comment.