From 50808d79f4d13abef20d6c1c3c59cd90e9186a74 Mon Sep 17 00:00:00 2001 From: nihui Date: Mon, 10 Jun 2024 22:57:15 +0800 Subject: [PATCH] Update convolution.cpp --- src/layer/convolution.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layer/convolution.cpp b/src/layer/convolution.cpp index fe025456f488..c55b3f276878 100644 --- a/src/layer/convolution.cpp +++ b/src/layer/convolution.cpp @@ -241,13 +241,13 @@ int Convolution::forward(const Mat& bottom_blob, Mat& top_blob, const Option& op op->create_pipeline(opt); // forward - op->forward(bottom_blob, top_blob, opt); + int ret = op->forward(bottom_blob, top_blob, opt); op->destroy_pipeline(opt); delete op; - return 0; + return ret; } } @@ -401,6 +401,8 @@ int Convolution::forward_int8(const Mat& bottom_blob, Mat& top_blob, const Optio opt_g.blob_allocator = opt.workspace_allocator; quantize_to_int8(bottom_blob, bottom_blob_unbordered, bottom_blob_int8_scales, opt_g); + if (bottom_blob_unbordered.empty()) + return -100; } Mat bottom_blob_bordered;