Skip to content

Commit

Permalink
add OPENVINO_ASSERT to prevent seg fault
Browse files Browse the repository at this point in the history
  • Loading branch information
wilson-seok committed Aug 2, 2024
1 parent 1050582 commit c7c8743
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ static std::shared_ptr<dnnl::convolution_forward::primitive_desc> get_convolutio
auto weights_md = onednn::layout_to_memory_desc(weights_layout, dnnl::memory::format_tag::any);
auto output_md = onednn::layout_to_memory_desc(output_layout, tag_in_out);

OPENVINO_ASSERT(!input_md.is_zero(),
"[GPU] The input memory descriptor of onednn convolution should not have zero dim.");
OPENVINO_ASSERT(!weights_md.is_zero(),
"[GPU] The weights memory descriptor of onednn convolution should not have zero dim.");
OPENVINO_ASSERT(!output_md.is_zero(),
"[GPU] The output memory descriptor of onednn convolution should not have zero dim.");

// adjust_conv_dilation_pad(dilation, stride, pad_l, pad_r, input_md, output_md, weights_md, grouped_weights);
for (size_t i = 0; i < dilation.size(); i++) {
dilation[i]--;
Expand Down

0 comments on commit c7c8743

Please sign in to comment.