Skip to content

[GPU] Fall back to ocl for convolution with unaligned feature#36886

Open
davidsnam-intel wants to merge 2 commits into
openvinotoolkit:masterfrom
davidsnam-intel:david/fix-unaligned-feature-onednn-conv
Open

[GPU] Fall back to ocl for convolution with unaligned feature#36886
davidsnam-intel wants to merge 2 commits into
openvinotoolkit:masterfrom
davidsnam-intel:david/fix-unaligned-feature-onednn-conv

Conversation

@davidsnam-intel

Copy link
Copy Markdown
Contributor

Issue

  • A dynamic-shape model produces NaN at a Convolution whose input/output feature count is not a multiple of the blocked-format sub-feature size.

Root Cause

  • For an unaligned feature (85), the blocked format b_fs_yx_fsv16 pads the feature dimension up to a multiple of 16 (96). The oneDNN convolution primitive reads the full sub-feature blocks, including the padding lanes.
  • In the dynamic memory-reuse path the reused buffer is not zero-filled, so those padding lanes contain stale bytes.
  • The concatenation oneDNN impl already guards against exactly this contract (zero-filled fsv padding required for unaligned feature blocks), but convolution did not.
image

Solution

  • Add an is_feature_aligned() check to the oneDNN convolution validate_impl()
  • If the input or output uses a blocked format whose feature dimension is not divisible by the sub-feature block size, reject the oneDNN impl so the node falls back to the OCL convolution, which handles the padding lanes safely.

Tickets:

@davidsnam-intel
davidsnam-intel requested review from a team as code owners July 14, 2026 16:08
@github-actions github-actions Bot added the category: GPU OpenVINO GPU plugin label Jul 14, 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