Skip to content

[GPU] Fix invalid axis in scatter_elements_update test parameters - #38085

Open
sungeunk wants to merge 1 commit into
openvinotoolkit:masterfrom
sungeunk:fix-scatter-elements-update-test-axis
Open

[GPU] Fix invalid axis in scatter_elements_update test parameters#38085
sungeunk wants to merge 1 commit into
openvinotoolkit:masterfrom
sungeunk:fix-scatter-elements-update-test-axis

Conversation

@sungeunk

@sungeunk sungeunk commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Details:

56 scatter_elements_update_gpu_* cases fail in ov_gpu_unit_tests with ScatterElementsUpdate index 1 is out of bounds for the axis of size 1.

ScatterElementsUpdateParams::axis is a logical (ov::Shape) axis: tensorToShape() reverses the spatial dimensions, and the plugin maps the axis back to cldnn order in convert_axis(). Two entries were written in cldnn order (b, f, x, y, z, w) instead, so both pointed at x rather than the dimension the indices tensor reduces:

Entry Was Points at Should be
3D (bfzyx) 4 x, size 1 2 (z, size 3)
4D (bfwzyx) 5 x, size 2 2 (w, size 3)

Their index values did not fit those sizes, so the reference read out of bounds. This stayed hidden until #37917 added index validation to the reference kernel. The plugin is fine — the test parameters were wrong.

Fixing the 4D axis then exposed duplicate indices within a batch: two elements wrote to the same offset, so the sequential reference gave -130 while the parallel GPU kernel gave -120. The indices are now distinct per batch.

Tickets:

  • 194433

AI Assistance:

  • AI assistance used: yes
  • AI: root cause analysis, fix
  • Human: review

🤖 Generated with Claude Code

ScatterElementsUpdateParams::axis is a logical (ov::Shape) axis: the test
reverses the spatial dimensions in tensorToShape(), and the GPU primitive
maps the axis back to cldnn order in convert_axis(). Two parameter entries
were written in cldnn tensor argument order (b, f, x, y, z, w) instead:

  - 3D entry used axis 4, which is x (size 1) in bfzyx, not z (size 3)
  - 4D entry used axis 5, which is x (size 2) in bfwzyx, not w (size 3)

Both addressed an axis too small for their index values, so the reference
read out of bounds. This went unnoticed until openvinotoolkit#37917 added index validation
to the reference kernel, which turned the silent out-of-bounds access into
56 failing tests.

Point both entries at the dimension the indices tensor actually reduces.
Fixing the 4D axis also exposed duplicate indices within a batch: two
elements targeted the same output offset, so the sequential reference
produced the last write while the parallel GPU kernel produced the other.
Make the indices distinct per batch so the NONE reduction is well defined.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sungeunk
sungeunk requested review from a team as code owners September 11, 2026 08:32
@github-actions github-actions Bot added the category: GPU OpenVINO GPU plugin label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant