Skip to content

Commit

Permalink
fix noint8 test, fix arm bf16 test
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Oct 10, 2024
1 parent 55e2de7 commit 061205a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/layer/arm/gemm_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions tests/test_gemm_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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},
Expand Down Expand Up @@ -241,6 +244,9 @@ int main()
if (ret != 0)
return ret;
}
#else
// test nothing for non-int8 build
#endif

return 0;
}

0 comments on commit 061205a

Please sign in to comment.