Skip to content

Commit

Permalink
fp16 pack8 output, cc
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Oct 11, 2024
1 parent 5e4fcfa commit 545f075
Show file tree
Hide file tree
Showing 2 changed files with 3,848 additions and 6,847 deletions.
10 changes: 9 additions & 1 deletion src/layer/arm/gemm_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6201,7 +6201,15 @@ int Gemm_arm::forward_int8(const std::vector<Mat>& bottom_blobs, std::vector<Mat
if (opt.use_packing_layout)
{
int outh = output_transpose ? N : M;
out_elempack = outh % 4 == 0 ? 4 : 1;
if (support_fp16_storage && opt.use_fp16_arithmetic)
{
// TODO use output_elemtype
out_elempack = outh % 8 == 0 ? 8 : outh % 4 == 0 ? 4 : 1;
}
else
{
out_elempack = outh % 4 == 0 ? 4 : 1;
}
}
#endif // __ARM_NEON

Expand Down
Loading

0 comments on commit 545f075

Please sign in to comment.