Skip to content

[Performance] Performance regression in Clip operator for int64 inputs between v1.20.0 and v1.21.0 #27052

@junghyunpark2001

Description

@junghyunpark2001

Describe the issue

Description

We observed a performance regression in the Clip operator for int64 data type with only minimum bound specified (no maximum bound) between ONNXRuntime v1.20.0 and v1.21.0.

Affected Operator

Clip

  • Opset Version: 13
  • Data Type: int64
  • Configuration: min bound only (no max bound)
  • Input Shape: [2, 3, 32, 32] (4D tensor)
  • Regression: Performance degradation observed

Test Case Details

Test Case: clip_13_v2_clip_int64_no_max

Input:

  • X (input tensor):

    • Shape: [2, 3, 32, 32] (4D tensor)
    • Data type: int64
    • Total elements: 6,144
  • min (minimum bound):

    • Shape: [] (scalar)
    • Data type: int64
    • Value: -100
  • max (maximum bound):

    • Not provided (unbounded on upper end)

Output:

  • Name: output
  • Shape: [2, 3, 32, 32]
  • Data type: int64

Operation:
Clips input values to be >= -100 (no upper bound).

Performance:

  • v1.20.0: baseline
  • v1.21.0: regression observed

Regression Characteristics

  • Data type specific: int64 input and bounds
  • Partial bounds: Only minimum bound specified (no maximum)
  • Moderate tensor size: 6,144 elements (2×3×32×32)
  • 4D input tensor: Standard tensor shape for vision-related operations

To reproduce

  1. Download zip

  2. Run benchmark using the provided script:

python profile_operator.py clip_13_v2_clip_int64_no_max 1.20.0 1.21.0


[Archive.zip](https://github.com/user-attachments/files/24695593/Archive.zip)

### Urgency

_No response_

### Platform

Linux

### OS Version

Ubuntu 24.04.3 LTS

### ONNX Runtime Installation

Released Package

### ONNX Runtime Version or Commit ID

1.21.0

### ONNX Runtime API

Python

### Architecture

X64

### Execution Provider

Default CPU

### Execution Provider Library Version

_No response_

### Model File

_No response_

### Is this a quantized model?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceissues related to performance regressionsstaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions