Skip to content

Commit

Permalink
[GPU] Add autopad option in CreateOp of groupconvolution (openvinotoo…
Browse files Browse the repository at this point in the history
…lkit#18897)

* add autopad option in CreateOp of groupnormalization

* add autopad option in CreateOp of GroupConvolution
  • Loading branch information
wilson-seok authored Aug 2, 2023
1 parent b0b6a38 commit 86b8e0a
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/intel_gpu/src/plugin/ops/convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static void CreateGroupConvolutionOp(Program& p, const std::shared_ptr<ngraph::o
auto dilations = op->get_dilations();
auto pads_begin = op->get_pads_begin();
auto pads_end = op->get_pads_end();
auto auto_pad = op->get_auto_pad();

if (!op->is_dynamic()) {
// Extend 1d vectors to 2d as 1d can't be handled properly by the graph optimizer for now
Expand All @@ -55,7 +56,8 @@ static void CreateGroupConvolutionOp(Program& p, const std::shared_ptr<ngraph::o
dilations,
pads_begin,
pads_end,
weights_have_group_dim);
weights_have_group_dim,
auto_pad);
p.add_primitive(*op, convPrim);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,42 @@ INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionLayerGPUTest_dynamic2D_AsymPad, G
::testing::ValuesIn(dynInputShapes2D),
::testing::Values<std::string>(ov::test::utils::DEVICE_GPU)),
GroupConvolutionLayerGPUTestDynamic::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionLayerGPUTest_dynamic2D_SymAutoPad, GroupConvolutionLayerGPUTestDynamic,
::testing::Combine(
::testing::Combine(
::testing::Values(SizeVector{3, 3}),
::testing::Values(SizeVector{1, 1}),
::testing::Values(std::vector<ptrdiff_t>{1, 2}),
::testing::Values(std::vector<ptrdiff_t>{1, 2}),
::testing::Values(SizeVector{1, 1}),
::testing::Values(4),
::testing::Values(4),
::testing::ValuesIn({ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER})),
::testing::Values(ElementType::f16),
::testing::Values(ElementType::f16),
::testing::Values(ElementType::undefined),
::testing::ValuesIn(dynInputShapes2D),
::testing::Values<std::string>(ov::test::utils::DEVICE_GPU)),
GroupConvolutionLayerGPUTestDynamic::getTestCaseName);

INSTANTIATE_TEST_SUITE_P(smoke_GroupConvolutionLayerGPUTest_dynamic2D_AsymAutoPad, GroupConvolutionLayerGPUTestDynamic,
::testing::Combine(
::testing::Combine(
::testing::Values(SizeVector{3, 3}),
::testing::Values(SizeVector{1, 1}),
::testing::Values(std::vector<ptrdiff_t>{1, 2}),
::testing::Values(std::vector<ptrdiff_t>{2, 1}),
::testing::Values(SizeVector{1, 1}),
::testing::Values(4),
::testing::Values(4),
::testing::ValuesIn({ngraph::op::PadType::SAME_LOWER, ngraph::op::PadType::SAME_UPPER})),
::testing::Values(ElementType::f16),
::testing::Values(ElementType::f16),
::testing::Values(ElementType::undefined),
::testing::ValuesIn(dynInputShapes2D),
::testing::Values<std::string>(ov::test::utils::DEVICE_GPU)),
GroupConvolutionLayerGPUTestDynamic::getTestCaseName);
} // namespace

} // namespace GPULayerTestsDefinitions

0 comments on commit 86b8e0a

Please sign in to comment.