diff --git a/src/layer/arm/gemm_arm.cpp b/src/layer/arm/gemm_arm.cpp index 79c551ae5a5..baf0da4e650 100644 --- a/src/layer/arm/gemm_arm.cpp +++ b/src/layer/arm/gemm_arm.cpp @@ -5980,6 +5980,7 @@ int Gemm_arm::create_pipeline_int8(const Option& opt) else #endif { + use_bf16 = opt.use_bf16_storage; } input_elemtype = 1; // fp32 diff --git a/tests/test_gemm_3.cpp b/tests/test_gemm_3.cpp index c70b26ccefa..5348f8d674e 100644 --- a/tests/test_gemm_3.cpp +++ b/tests/test_gemm_3.cpp @@ -14,6 +14,7 @@ #include "testutil.h" +#if NCNN_INT8 static int test_gemm_int8(int M, int N, int K, float alpha, int transA, int transB, int output_elemtype, int output_transpose, int constantA, int constantB, int output_N1M) { ncnn::ParamDict pd; @@ -186,11 +187,13 @@ static int test_gemm_1(int M, int N, int K) || test_gemm_int8_bias(M, N, K, RandomMat(N, 1), -2.1f, -0.5f, 0, 0, 2, 0, 1, 1, 1) || test_gemm_int8_bias(M, N, K, RandomMat(N), -3.1f, -0.6f, 0, 1, 3, 0, 1, 1, 1); } +#endif // NCNN_INT8 int main() { SRAND(7767517); +#if NCNN_INT8 int mnk[][3] = { {1, 1, 1}, {2, 2, 2}, @@ -241,6 +244,9 @@ int main() if (ret != 0) return ret; } +#else + // test nothing for non-int8 build +#endif return 0; }