Skip to content

Conversation

@DrewBearly
Copy link
Contributor

Removes the resizing of strides, dilation, pads_begin, and pads_end vectors when not using dynamic shapes or new_shape_infer for convolutions on GPU plugin. This simultaneously adds compatibility with the iDP3 model for GPU plugin.

Before, this was apparently added to support a specific model with an older version of the shape_infer code. However, with current OV runtime shape_infer code, models that include a convolution layer with <data strides="1" dilations="1" pads_begin="2" pads_end="2" auto_pad="explicit" /> as layer params hit a validation error. The old code creates a second dimension to each of these vectors, mutating it to the equivalent of <data strides="1,1" dilations="1,1" pads_begin="2,0" pads_end="2,0" auto_pad="explicit" /> - when this is wrapped into a node and validated (

pooling::valid_dilated_kernel_with_dim(op, filter_dilated.get_length(), dim, i);
) during device-specific compiliation, it fails since the second layer isn't big enough (dim = 1 but it should be = 5 like the first layer). The user would receive an error like: While validating node 'opset1::Convolution Convolution_49616 () -> ()' with friendly_name 'Convolution_49616': Kernel after dilation has size (dim: 5) larger than the data shape after padding (dim: 1) at axis 1. Thus, the model never compiled for GPU and would also mask other underlying issues.

Checked with the original model referenced when this was added and it works with the change. Other models (a random sampling, not an exhaustive one) that also had the same validation issue (producing the same error message) now finish compiling for GPU or produce other, more specific (and more valuable) error messages for further debugging.

Also added 4 tests: two unit tests that test a convolution with explicit padding at 0, explicit padding at 2 begin and 2 end; and 2 functional single-layer test, one that uses explicit padding (0 at beginning and 0 at end) and explicit with 2 at beginning and 2 at end.

No delta on existing unit or smoke tests passing or failing. Dynamic convolution layers and setups that set the flag OV_GPU_ALLOW_NEW_SHAPE_INFER will see no change.

Details:

  • removed convolution params expansion for IR definitions with 1D stride, dilation, and padding inputs from GPU conv op definition
  • added single layer convolution test for GPU with explicit 0 padding
  • added single layer convolution test for GPU with explicit 2 begin and 2 ending padding
  • added conv gpu unit test with 1D stride, dilation inputs and 0 padding
  • added conv gpu unit test with 1D stride, dilation params and 2 begin, 2 end padding

Tickets:

@DrewBearly DrewBearly requested review from a team as code owners December 11, 2025 23:32
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Dec 11, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalIntelPR External contributor from Intel label Dec 11, 2025
@p-durandin
Copy link
Contributor

build_jenkins

Copy link
Contributor

@e-ddykim e-ddykim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to run all your newly added test cases successfully without applying your changes. I don't understand what your problem is.


auto output_memory = outputs.at("conv").get_memory();
auto output_layout = output_memory->get_layout();
cldnn::mem_lock<float> output_ptr(output_memory, get_test_stream());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cldnn::mem_lock<float> output_ptr(output_memory, get_test_stream());
cldnn::mem_lock<float, cldnn::mem_lock_type::read> output_ptr(output_memory, get_test_stream());


auto output_memory = outputs.at("conv").get_memory();
auto output_layout = output_memory->get_layout();
cldnn::mem_lock<float> output_ptr(output_memory, get_test_stream());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cldnn::mem_lock<float> output_ptr(output_memory, get_test_stream());
cldnn::mem_lock<float, cldnn::mem_lock_type::read> output_ptr(output_memory, get_test_stream());

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

Labels

category: GPU OpenVINO GPU plugin ExternalIntelPR External contributor from Intel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants