[GPU] Fix invalid axis in scatter_elements_update test parameters - #38085
Open
sungeunk wants to merge 1 commit into
Open
[GPU] Fix invalid axis in scatter_elements_update test parameters#38085sungeunk wants to merge 1 commit into
sungeunk wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details:
56
scatter_elements_update_gpu_*cases fail inov_gpu_unit_testswithScatterElementsUpdate index 1 is out of bounds for the axis of size 1.ScatterElementsUpdateParams::axisis a logical (ov::Shape) axis:tensorToShape()reverses the spatial dimensions, and the plugin maps the axis back to cldnn order inconvert_axis(). Two entries were written in cldnn order (b, f, x, y, z, w) instead, so both pointed atxrather than the dimension the indices tensor reduces:x, size 1z, size 3)x, size 2w, 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
-130while the parallel GPU kernel gave-120. The indices are now distinct per batch.Tickets:
AI Assistance:
🤖 Generated with Claude Code