[GPU] Minor fix for shape inference of dynmaic reshape (#17565)
Signed-off-by: Andrew Park <andrew.park@intel.com>
This commit is contained in:
parent
48f207f961
commit
4ccb6794a4
|
|
@ -74,6 +74,11 @@ std::vector<layout> reshape_inst::calc_output_layouts(reshape_node const& /*node
|
|||
|
||||
ShapeType pattern_shape = impl_param.input_layouts.size() == 2 ? impl_param.get_input_layout(1).get<ShapeType>()
|
||||
: ShapeType(ov::Shape{ prim->output_pattern.size() });
|
||||
// Since reshape does not support 0D tensor(scalar) for shape input
|
||||
// the case propagated to 0D tensor should be handled manually with 1D tensor
|
||||
if (pattern_shape.size() == 0) {
|
||||
pattern_shape = ShapeType{1};
|
||||
}
|
||||
std::vector<ShapeType> output_shapes = {ShapeType()};
|
||||
std::vector<ShapeType> input_shapes = {
|
||||
input_layout.get<ShapeType>(),
|
||||
|
|
|
|||
|
|
@ -81,6 +81,11 @@ INSTANTIATE_TEST_SUITE_P(smoke, reshape_test_two_inputs,
|
|||
layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {0, 0, 16, 64}, ov::PartialShape::dynamic(4), true,
|
||||
layout{ov::PartialShape{1, 384, 16, 64}, data_types::f32, format::bfyx}
|
||||
},
|
||||
{
|
||||
layout{ov::PartialShape{1, 128, 1024}, data_types::f32, format::bfyx},
|
||||
layout{ov::PartialShape{}, data_types::i64, format::bfyx}, {131072}, ov::PartialShape::dynamic(1), true,
|
||||
layout{ov::PartialShape{131072}, data_types::f32, format::bfyx}
|
||||
},
|
||||
{
|
||||
layout{ov::PartialShape::dynamic(2), data_types::f32, format::bfyx},
|
||||
layout{ov::PartialShape{4}, data_types::i64, format::bfyx}, {0, 1, 2, 3}, ov::PartialShape::dynamic(4), true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue