Skip to content

tf.nn.depthwise_conv2d crashes with large strides values when ONEDNN is enabled #97165

@jiren-the-gray

Description

@jiren-the-gray

Issue type

Bug

Have you reproduced the bug with TensorFlow Nightly?

Yes

Source

source

TensorFlow version

2.20.0-dev20250716

Custom code

Yes

OS platform and distribution

Linux Ubuntu 20.04

Mobile device

No response

Python version

3.12

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

Running tf.nn.depthwise_conv2d on CPU with large values of strides crashes when ONEDNN is enabled with Aborted (core dumped). Setting TF_ENABLE_ONEDNN_OPTS=0 does not cause the crash and throws an InvalidArgumentError instead (expected behavior).

Reproducible in colab with 2.19.0 (colab)

Standalone code to reproduce the issue

import tensorflow as tf

print(tf.__version__)   # 2.20.0-dev20250716

input_tensor = tf.constant([[[[1.],[2.]],[[3.],[4.]]]], dtype=tf.float32)
filter_tensor = tf.constant([[[[1., 2.]]]], dtype=tf.float32)
strides = [4817177250100823153, 5276955028067489600, -6860092642535747309, -915217906097603218]
padding = 'VALID'
data_format = 'NHWC'
dilations = [1, 1]

with tf.device('/cpu:0'):
    output_cpu = tf.nn.depthwise_conv2d(input_tensor, filter_tensor, strides=strides, padding=padding, data_format=data_format, dilations=dilations, name='depthwise_conv2d_1')

Relevant log output

2025-07-18 03:42:56.115716: F tensorflow/core/common_runtime/mkl_layout_pass.cc:2703] Non-OK-status: GetNodeAttr(orig_node->def(), "strides", &strides)
Status: INVALID_ARGUMENT: Attr strides has value 4817177250100823153 out of range for an int32
Aborted (core dumped)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy