You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by GitBox <gi...@apache.org> on 2026/08/27 20:57:01 UTC

[GH] (tvm/fix/relax-onnx-scatter-broadcast): Workflow run "CI" failed!

The GitHub Actions job "CI" on tvm.git/fix/relax-onnx-scatter-broadcast has failed.
Run started by GitHub user siyiweigeHEW (triggered by siyiweigeHEW).

Head commit for run:
2014387e631f29b3b2d0deb93d02459b084caf59 / HuEnwei <hu...@tju.edu.cn>
Fix Scatter with indices smaller than data

Scatter._impl_v9 forwarded indices/updates to relax.op.scatter_elements
regardless of their shape. ONNX Scatter (opset 9/10) iterates over
indices' own shape: for each entry idx,
  output[idx[:axis] + (indices[idx],) + idx[axis+1:]] = updates[idx],
which matches scatter_elements only when indices has data's exact shape.
For a legal model whose indices/updates are smaller than data (e.g.
size-1 broadcast dims), the scatter_elements lowering silently produced
wrong values, diverging from onnxruntime.

Lower the shape-mismatched case as scatter_nd with explicit per-entry
target positions: a constant coordinate grid of indices' shape with the
axis column replaced by the flattened indices values. This is exact for
every axis and any indices shape; the scatter_elements path is kept for
the statically-known exact-shape and dynamic-shape cases.

The fix also makes Scatter with mismatched indices work for axis 0 and 2,
which test_scatter previously skipped, so restrict that skip to
ScatterElements (still lowered via scatter_elements), and add
test_scatter_broadcast covering the size-1 broadcast cases across axes.

Report URL: https://github.com/apache/tvm/actions/runs/32903674651

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org