Skip to content

OpenVINO EP rejects valid Resize-18 models with negative axes #28788

@yuslepukhin

Description

@yuslepukhin

Describe the issue

The OpenVINO EP's Resize operator translator does not normalize negative axes values against the input rank before model compilation. This causes valid opset-18 Resize models that use negative axes (e.g. [-3, -2, -1] for a 5-D input) to fail at session-init time, while the same models run correctly on the CPU EP and other EPs that go through UpsampleBase.

Per the ONNX Resize-18 spec, axes entries are valid in [-rank, rank-1] and negative entries denote dimensions counted from the back. The CPU EP normalizes via UpsampleBase::ValidateAndNormalizeAxes and accepts these inputs.

Reproduction

The new unit test ResizeOpTest.Axes_NegativeInRange_18 (added in #28779) exercises this path:

  • input shape {1, 1, 4, 4, 4}, scales {0.75, 0.75, 0.75}, axes {-3, -2, -1}
  • CPU/CUDA/WebGPU/DML/QNN: pass (or expected to pass / are excluded for unrelated reasons)
  • OpenVINO EP: fails during compilation with an exception rethrown from onnxruntime/core/providers/openvino/backends/basic_backend.cc

CI surface: linux_openvino_ci.yml job --use_openvino CPU --enable_generic_interface --build_shared_lib.

Expected behavior

The OpenVINO EP's Resize translator should normalize each axes[i] against the input rank (a = axes[i] < 0 ? axes[i] + rank : axes[i]) and validate a in [0, rank) before forwarding to the OpenVINO model importer, mirroring what UpsampleBase::ValidateAndNormalizeAxes does.

Workaround

In #28779 the affected test excludes kOpenVINOExecutionProvider with a comment pointing back to this issue. Once the EP is fixed the exclusion can be removed.

Urgency

Low. Pre-existing behavior on main (not a regression). Visible because #28779 is the first test case to exercise negative axes for Resize.

Platform

Linux, OpenVINO EP (CPU device).

ONNX Runtime Installation

Built from source.

Execution Provider

OpenVINO

Related

PR #28779

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:DMLissues related to the DirectML execution providerep:OpenVINOissues related to OpenVINO execution providerep:QNNissues related to QNN exeution providerep:WebGPUort-web webgpu providerplatform:webissues related to ONNX Runtime web; typically submitted using template

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions