From b593419569f1ee24a11d2a98ac49c10b0fdfcfeb Mon Sep 17 00:00:00 2001 From: nihuini Date: Thu, 11 Apr 2024 11:33:52 +0800 Subject: [PATCH] fix arm riscv build with NCNN_BF16=OFF --- src/net.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/net.cpp b/src/net.cpp index 1f8f9fbb741..cb6dea8a4d8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -646,7 +646,10 @@ int NetPrivate::convert_layout(Mat& bottom_blob, const Layer* layer, const Optio cast_float32_to_bfloat16(bottom_blob, bottom_blob_bf16, opt); bottom_blob = bottom_blob_bf16; } + else #endif // NCNN_BF16 + { + } // *INDENT-ON* // clang-format on @@ -756,7 +759,10 @@ int NetPrivate::convert_layout(Mat& bottom_blob, const Layer* layer, const Optio cast_bfloat16_to_float32(bottom_blob, bottom_blob_fp32, opt); bottom_blob = bottom_blob_fp32; } + else #endif // NCNN_BF16 + { + } // *INDENT-ON* // clang-format on