Skip to content

Commit 9a8cc6c

Browse files
committed
Fix 3d shape of onednn fully_connected output_layout for testcase.
Signed-off-by: yuan.xiong <[email protected]>
1 parent 53f0812 commit 9a8cc6c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/plugins/intel_gpu/src/graph/impls/onednn/fully_connected_onednn.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,13 @@ struct fully_connected_onednn : typed_primitive_onednn_impl<fully_connected> {
160160
if (prim_input_size < 4) {
161161
auto output_pshape = output_layout.get_partial_shape();
162162
if (output_pshape.size() > prim_input_size) {
163+
std::vector<ov::Dimension> new_dims;
164+
for (const auto& dim : output_pshape) {
165+
if (!dim.is_static() || dim.get_length() != 1)
166+
new_dims.push_back(dim);
167+
}
168+
ov::PartialShape new_shape(new_dims);
169+
output_pshape = new_shape;
163170
output_pshape.resize(prim_input_size);
164171
output_layout.set_partial_shape(output_pshape);
165172
}

0 commit comments

Comments
 (0)