Skip to content

tf.nn.atrous_conv2d aborts on CPU with invalid input rank while GPU raises InvalidArgumentError #125510

Closed

Description

@TTZTTZ1

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

binary

TensorFlow version

tf2.21.0

Custom code

Yes

OS platform and distribution

Ubuntu 22.04.5 LTS

Mobile device

N/A

Python version

3.10.20

Bazel version

N/A

GCC/compiler version

N/A

CUDA/cuDNN version

CUDA 13.0.88 cuDNN 9.x

GPU model and memory

NVIDIA GeForce RTX 5090 32G

Current behavior?

tf.nn.atrous_conv2d shows inconsistent behavior between CPU and GPU when given an input tensor with an invalid rank.

The operation receives a rank-1 input tensor while the convolution filter has the expected 4D shape. The behavior differs depending on the execution device.

Observed behavior:

GPU execution raises a normal TensorFlow exception:

InvalidArgumentError: convolution input must be 4-dimensional: [10] [Op:Conv2D]

CPU execution terminates with a fatal check failure:

Check failed: index >= 0 && index < num_total_dims Invalid index from the dimension: 3, 0, C
*** Check failure stack trace: ***
Aborted

Expected behavior:

TensorFlow should consistently validate input ranks on both CPU and GPU and raise a framework-level exception such as InvalidArgumentError instead of aborting the process on CPU.

Standalone code to reproduce the issue

import tensorflow as tf

value = tf.zeros([10], dtype=tf.float32)

filters = tf.zeros([5, 5, 1, 8], dtype=tf.float32)

tf.nn.atrous_conv2d(
    value,
    filters,
    rate=1,
    padding="VALID"
)

Relevant log output

GPU:
tensorflow.python.framework.errors_impl.InvalidArgumentError: convolution input must be 4-dimensional: [10] [Op:Conv2D]

CPU:
Check failed: index >= 0 && index < num_total_dims Invalid index from the dimension: 3, 0, C
*** Check failure stack trace: ***
Aborted

Activity

  1. added
    comp:ops
    2.21.0
    on Aug 18, 2026
  2. Venkat6871 commented on Aug 26, 2026

    @Venkat6871
    Contributor

    Hi @TTZTTZ1 ,
    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 @adi-IL ,
    Thank you for raising the PR to address this issue. We truly appreciate your initiative and the effort in contributing the fix.

  3. google-ml-butler commented on Aug 26, 2026

    @google-ml-butler

    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

Metadata

Metadata

Assignees

Labels

2.21.0awaiting PR mergecomp:opstype:bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions