Skip to content

Commit

Permalink
Merge pull request #49544 from geetachavan1/cherrypicks_UUYUB
Browse files Browse the repository at this point in the history
Fix FPE issue in external Eigen source code issue with `tf.raw_ops.SparseMatMul`.
  • Loading branch information
mihaimaruseac committed May 27, 2021
2 parents 99931bc + dd63731 commit a525ac6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tensorflow/core/kernels/sparse_matmul_op.cc
Original file line number Diff line number Diff line change
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 a525ac6

Please sign in to comment.