Skip to content

[Performance] Performance regression in Softplus operator between v1.20.0 and v1.21.0 (~25% slowdown) #27117

@junghyunpark2001

Description

@junghyunpark2001

Describe the issue

Description

Performance regression in Softplus operator (float32) between ONNXRuntime v1.20.0 and v1.21.0.

Affected Operator

Softplus

  • Opset Version: 21
  • Data Type: float32
  • Regression: +25.30% kernel time
  • Status: Confirmed, persists to v1.23.0

Test Case

Input:

  • Shape: [1024] (1D tensor)
  • Data type: float32
  • Value range: [0.12, 9.99] (large magnitude extremes)

Performance:

Metric v1.20.0 v1.21.0 Change
Kernel Time 0.0377 ms 0.0472 ms +25.30% ⚠️
  • Warmup: 30, Measurement: 100
  • Kernel CV: 7.0% → 6.6%

Analysis

Suspected Cause:

  • Related to SELU/ELU Eigen update (exponential function handling)
  • Softplus: log(1 + e^x) uses exponential operations
  • Similar Eigen vectorization regression as other activation functions

To reproduce

  1. Download zip file

Archive.zip

  1. Run benchmark using the provided script: ```bash
    python script_profiling.py softplus_softplus_21_softplus_large_magnitude_extremes_1d_1024 1.20.0 1.21.0
    
    
    

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

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 regressions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions