Skip to content

Commit e170a7b

Browse files
nihuisen.li
authored and
sen.li
committed
fix arm riscv build with NCNN_BF16=OFF (Tencent#5422)
1 parent 5d71027 commit e170a7b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/net.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,10 @@ int NetPrivate::convert_layout(Mat& bottom_blob, const Layer* layer, const Optio
646646
cast_float32_to_bfloat16(bottom_blob, bottom_blob_bf16, opt);
647647
bottom_blob = bottom_blob_bf16;
648648
}
649+
else
649650
#endif // NCNN_BF16
651+
{
652+
}
650653

651654
// *INDENT-ON*
652655
// clang-format on
@@ -756,7 +759,10 @@ int NetPrivate::convert_layout(Mat& bottom_blob, const Layer* layer, const Optio
756759
cast_bfloat16_to_float32(bottom_blob, bottom_blob_fp32, opt);
757760
bottom_blob = bottom_blob_fp32;
758761
}
762+
else
759763
#endif // NCNN_BF16
764+
{
765+
}
760766

761767
// *INDENT-ON*
762768
// clang-format on

0 commit comments

Comments
 (0)