Browse Source

Update convolution_riscv.cpp (#3050)

tags/20211122
nihui GitHub 4 years ago
parent
commit
ceec22cd46
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 19 deletions
  1. +1
    -19
      src/layer/riscv/convolution_riscv.cpp

+ 1
- 19
src/layer/riscv/convolution_riscv.cpp View File

@@ -268,25 +268,7 @@ int Convolution_riscv::forward(const Mat& bottom_blob, Mat& top_blob, const Opti

if (bottom_blob.dims != 3)
{
Mat bottom_blob_unpacked = bottom_blob;
if (bottom_blob.elempack != 1)
{
Option opt_pack1 = opt;
opt_pack1.blob_allocator = opt.workspace_allocator;

convert_packing(bottom_blob, bottom_blob_unpacked, 1, opt_pack1);
}

Mat bottom_blob_unpacked_fp32 = bottom_blob_unpacked;
if (bottom_blob_unpacked.elembits() == 16)
{
Option opt_pack1 = opt;
opt_pack1.blob_allocator = opt.workspace_allocator;

cast_float16_to_float32(bottom_blob_unpacked, bottom_blob_unpacked_fp32, opt_pack1);
}

return Convolution::forward(bottom_blob_unpacked_fp32, top_blob, opt);
return Convolution::forward(bottom_blob, top_blob, opt);
}

int elembits = bottom_blob.elembits();


Loading…
Cancel
Save