-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[GPU] Remove Convolution Op Params Resizing for GPU Plugin (+ Tests) #33212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[GPU] Remove Convolution Op Params Resizing for GPU Plugin (+ Tests) #33212
Conversation
…e, dilation, and padding inputs
…e, dilation, and padding inputs
…/openvino into aherrold/gpu_conv_fix
|
build_jenkins |
There was a problem hiding this 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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()); |
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 (openvino/src/core/shape_inference/include/convolution_shape_inference_util.hpp
Line 275 in 88a4f85
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:
Tickets: