Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tf.sparse.eye crashes(aborts) when num_rows contains large number #46912

Closed
DNXie opened this issue Feb 4, 2021 · 4 comments
Closed

tf.sparse.eye crashes(aborts) when num_rows contains large number #46912

DNXie opened this issue Feb 4, 2021 · 4 comments
Assignees
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.1 for tracking issues in 2.1 release TF 2.4 for issues related to TF 2.4 type:bug Bug

Comments

@DNXie
Copy link

DNXie commented Feb 4, 2021

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 18.04
  • Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: N/A
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below):2.1.0
  • Python version:3.7.6
  • Bazel version (if compiling from source):N/A
  • GCC/Compiler version (if compiling from source):N/A
  • CUDA/cuDNN version:N/A
  • GPU model and memory:N/A

Describe the current behavior
tf.sparse.eye crashes(aborts) when num_rows contains large number

Describe the expected behavior
expect an exception message if the input unexpected instead of crash.

Standalone code to reproduce the issue

import tensorflow as tf
import numpy as np
tf.sparse.eye(num_rows=9223372036854775807, num_columns=None)

Output

2021-02-04 04:36:57.184236: F tensorflow/core/framework/tensor_shape.cc:345] Check failed: size >= 0 (-9223372036854775808 vs. 0)
Aborted (core dumped)
@DNXie DNXie added the type:bug Bug label Feb 4, 2021
@ravikyram ravikyram added comp:ops OPs related issues TF 2.1 for tracking issues in 2.1 release labels Feb 4, 2021
@ravikyram
Copy link
Contributor

I have tried in colab with TF versions 2.1, 2.4, nightly versions (2.5.0-dev20210203) and was able to reproduce the issue.Please, find the gist here. Thanks!

@ravikyram ravikyram assigned rmothukuru and unassigned ravikyram Feb 4, 2021
@rmothukuru rmothukuru added stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.4 for issues related to TF 2.4 labels Feb 5, 2021
@saikumarchalla
Copy link

Was able to reproduce the issue using TF 2.6 Nightly version and the colab crashes. Please find the gist here.

@yongtang
Copy link
Member

With PR #51359 merged, this is issue is fixed now. I will close this issue but feel free to reopen if the issue persist.

@google-ml-butler
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:ops OPs related issues stat:awaiting tensorflower Status - Awaiting response from tensorflower TF 2.1 for tracking issues in 2.1 release TF 2.4 for issues related to TF 2.4 type:bug Bug
Projects
None yet
Development

No branches or pull requests

5 participants