Skip to content

Aborted (core dumped) in tf.linalg.det/slogdet/logdet/cholesky/inv #76730

Closed

Description

@x0w3n

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.18.0-dev20240925

Custom code

Yes

OS platform and distribution

Linux Ubuntu 22.04.3 LTS (x86_64)

Mobile device

No response

Python version

3.9.13

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

tf.linalg.det/slogdet/logdet/cholesky/inv triggered a crash when the input is empty. Note that this will only be triggered if the gpu is available.

Standalone code to reproduce the issue

import tensorflow as tf

invalid_input = tf.zeros([])
tf.linalg.det(invalid_input)    # crash
tf.linalg.slogdet(invalid_input)  # crash
tf.linalg.cholesky(invalid_input)  # crash
tf.linalg.logdet(invalid_input)  # crash
tf.linalg.inv(invalid_input)  # crash

Relevant log output

2024-09-28 21:11:10.188752: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-09-28 21:11:10.199880: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-09-28 21:11:10.213635: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-09-28 21:11:10.221654: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-09-28 21:11:10.279720: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 AVX512F AVX512_VNNI AVX512_BF16 AVX512_FP16 AVX_VNNI AMX_TILE AMX_INT8 AMX_BF16 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-09-28 21:11:17.015480: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2021] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 3114 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 4090, pci bus id: 0000:1f:00.0, compute capability: 8.9
2024-09-28 21:11:17.015957: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2021] Created device /job:localhost/replica:0/task:0/device:GPU:1 with 1724 MB memory:  -> device: 1, name: NVIDIA GeForce RTX 4090, pci bus id: 0000:d4:00.0, compute capability: 8.9
2024-09-28 21:11:17.154391: F tensorflow/core/framework/tensor_shape.cc:356] Check failed: d >= 0 (0 vs. -1)
Aborted (core dumped)

Activity

  1. added
    comp:ops
    2.17
    on Sep 30, 2024
  2. tilakrayal commented on Oct 1, 2024

    @tilakrayal
    Contributor

    @x0w3n,
    I tried to execute the mentioned code on both CPU and GPU, in CPU the code was executed with the error output and on GPU the same code was aborted. Kindly find the gist of it here

    Screenshot 2024-10-01 4 54 44 PM

  3. added
    stat:awaiting tensorflower
    on Oct 9, 2024
  4. jiren-the-gray commented on Jan 23, 2026

    @jiren-the-gray

    @tilakrayal @dhantule The crash still exists on Tenosrflow==2.20.0 and it can be reproduced with non-empty (but scalar) tensors as well. Please see this gist.

  5. removed
    stat:awaiting tensorflower
    on Jun 3, 2026
  6. Kayyuri commented on Jun 3, 2026

    @Kayyuri

    Hi @x0w3n,
    Thank you so much for filing this issue. We truly appreciate your support. At the moment, this request is not prioritized and mark it for community contributions. If you would like to contribute on a fix, please feel free to fork the repository and submit a pull request in accordance with the TensorFlow CONTRIBUTION GUIDELINES and link this issue in your PR to ensure the maintainers can easily review and collaborate.
    To avoid duplicate work, please leave a comment here if you decide to take it on!

    Thank you again for your interest and we look forward to seeing your contributions!

  7. added
    stat:contribution welcome
    on Jun 3, 2026
  8. bodapatisaikrishna commented on Sep 25, 2026

    @bodapatisaikrishna
    Contributor

    Hi @Kayyuri, I have submitted a pull request with the fix and regression tests for this issue: #128068.

  9. removed
    stat:contribution welcome
    on Sep 29, 2026
  10. Venkat6871 commented on Sep 29, 2026

    @Venkat6871
    Contributor

    Hi @x0w3n ,
    Thank you for raising your concern here.
    A fix for this issue has been proposed in this PR. Once it is merged, this issue will be resolved.

    Hi @bodapatisaikrishna ,
    Thank you for raising the PR to address this issue. We truly appreciate your initiative and the effort in contributing the fix.

  11. google-ml-butler commented on Sep 30, 2026

    @google-ml-butler

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

  12. added a commit that references this issue on Sep 30, 2026
    16ecd66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

2.17awaiting PR mergecomp:opstype:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions