Skip to content

[Bug]: CPU: a Concat/ReduceMean/Unsqueeze/Tile/Reshape graph returns the right float32 values in the wrong element order #37962

Description

@lackjava-creator

OpenVINO Version

2026.3.1-22476-759c5a6ab8c; also 2025.4.1-20426-82bbf0292c5

Operating System

Other (Please specify in description)

Device used for inference

CPU

Framework

ONNX

Model used

Attached ZIP: ONNX model, inputs, expected outputs, and runner

Issue description

Environment

  • OpenVINO version: 2026.3.1-22476-759c5a6ab8c-releases/2026/3 (verified 2026-09-06); first seen on 2025.4.1-20426-82bbf0292c5.
  • Build / install: pip wheel openvino==2026.3.1
  • OS / Python: Ubuntu 24.04.3 LTS x86_64, Python 3.10
  • Reference implementations: onnx.reference.ReferenceEvaluator (onnx 1.17.0), onnxruntime 1.20.1 CPU EP
  • Target / device: CPU plugin

Minimal reproducer

27-node float32 ONNX graph (Concat / ReduceMean / Unsqueeze / Tile / Slice / Reshape / Shape), two inputs v1_0: float32[4,6,4] and v0_0: float32[4,5,4], one output float32[32]. Attached as model.onnx + feed.npz (+ expected.npz) with run.py (same 18-line driver as the other reports in this batch).

Expected vs actual

Output float32[32], 24 / 32 elements differ. Full precision, first 24 shown:

  • Expected (onnx.reference.ReferenceEvaluator, matched element-for-element by onnxruntime CPU EP) — each distinct value appears twice in a row:
0.27272728085517883, 0.27272728085517883, 0.9090909361839294, 0.9090909361839294,
0.7272727489471436,  0.7272727489471436,  0.6363636255264282, 0.6363636255264282,
0.4545454680919647,  0.4545454680919647,  0.27272728085517883, 0.27272728085517883,
0.9090909361839294,  0.9090909361839294,  0.7272727489471436,  0.7272727489471436,
0.6363636255264282,  0.6363636255264282,  0.4545454680919647,  0.4545454680919647,
0.27272728085517883, 0.27272728085517883, 0.9090909361839294,  0.9090909361839294
  • Actual (OpenVINO CPU 2026.3.1) — the same five distinct values, but in block order instead of interleaved:
0.27272728085517883, 0.9090909361839294, 0.7272727489471436, 0.6363636255264282,
0.27272728085517883, 0.9090909361839294, 0.7272727489471436, 0.6363636255264282,
0.4545454680919647,  0.27272728085517883, 0.9090909361839294, 0.7272727489471436,
0.4545454680919647,  0.27272728085517883, 0.9090909361839294, 0.7272727489471436,
0.6363636255264282,  0.4545454680919647,  0.27272728085517883, 0.9090909361839294,
0.6363636255264282,  0.4545454680919647,  0.27272728085517883, 0.9090909361839294
  • Difference: max abs 0.6363636553287506, max rel 2.3333333333333335, 24 / 32 elements; largest at index (1,) where the spec has 0.27272728085517883 and OpenVINO has 0.9090909361839294.
  • The multiset of values is identical. Every individual ReduceMean result is bit-exact; what differs is which position each one lands in. So this is an index/layout defect in the Unsqueeze → Tile → Reshape flattening, not an arithmetic one.
  • The output shape is correct ((32,)), which is why it is not the already-fixed Concat+Reduce shape-leak family.
  • Cross-backend: the same program passes on Apache TVM and TensorFlow/XLA.

Root cause (if known)

Not localised. The Tile is not at fault on its own: the isolated patterns Unsqueeze(axis=1) → Tile([1,2]) → Reshape([8]) (expected 1,1,2,2,3,3,4,4) and Unsqueeze(axis=0) → Tile([2,1]) → Reshape([8]) (expected 1,2,3,4,1,2,3,4) are both correct on this same OpenVINO build. The defect needs this graph's combination with Concat, ReduceMean and Slice.

Why this is a bug (not tolerance / not undefined behaviour)

The element ordering of Tile-13 and Reshape-19 is fully specified (row-major, Tile repeating along each axis repeats[i] times), so there is no implementation freedom in which value goes into which position. The bit-exactness of every individual value rules out a tolerance explanation, and the correct output shape rules out a shape-inference issue. Two independent implementations — ONNX's own reference evaluator and onnxruntime — produce the interleaved order.

How found

Found by EquiAutomaton (equivalence-graph differential testing against onnxruntime / torch eager). Depth-0 (the seed graph itself fails). Signature b17301f83d40, 5 independent observations, replayed on 2026.3.1 in a fresh process.

Step-by-step reproduction

Run run.py from the attached ZIP. Full steps and exact outputs are in the issue description.

https://github.com/user-attachments/files/31877191/OV-3-reproducer.zip

Relevant log output

See the exact reference/OpenVINO output comparison in the issue description.

Issue submission checklist

  • I'm reporting an issue. It's not a question.
  • I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
  • There is reproducer code and related data files such as images, videos, models, etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions