Skip to content

[Reduction] Extend noop_with_empty_axes behavior to non-CPU EPs #26541

@naomiOvad

Description

@naomiOvad

Describe the issue

Follow-up to #26288 and PR #26436.

The spec-aligned noop_with_empty_axes behavior for Reduce operators is currently implemented only for the CPU Execution Provider.
Other EPs (e.g., CUDA, TensorRT, OpenVINO) still rely on the previous reduction logic and should be updated to match the ONNX specification.

This issue extends the spec-aligned behavior introduced in PR #26436 to all non-CPU providers for consistency across Execution Providers.

To reproduce

(After PR is merged, or, on branch fix/reduction-noop-empty-axes )
Run any Reduce operator (e.g. ReduceSumSquare) with axes=[] and noop_with_empty_axes=1 on a non-CPU EP
(e.g., CUDA, TensorRT, OpenVINO).
The output will differ from the CPU EP, which already follows the ONNX spec.

Urgency

No response

Platform

Windows

OS Version

Windows 11 Pro 25H2 (Build 26200.7019)

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

c726497

ONNX Runtime API

Python

Architecture

X64

Execution Provider

Default CPU

Execution Provider Library Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:OpenVINOissues related to OpenVINO execution provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions