未验证 提交 47d21d28 编写于 作者: H HappyAngel 提交者: GitHub

[arm] add v8-4x8 gemm implement (#4201)

* add v8 4x8 implment. test=devvelop

* fix run error

* change sgemm compute. test=develop

* fix format. test=develop
上级 03951c1a
......@@ -38,9 +38,10 @@ void sgemm(bool is_transA,
ARMContext* ctx) {
int hblock = get_hblock(ctx);
int m_roundup = hblock * ((M + hblock - 1) / hblock);
ctx->ExtendWorkspace(m_roundup * K * sizeof(float));
auto packed_A = static_cast<float*>(
TargetMalloc(TargetType::kARM, m_roundup * K * sizeof(float)));
auto packed_A = static_cast<float*>(ctx->workspace_data<float>()) +
ctx->llc_size() / sizeof(float);
prepackA(packed_A, A, alpha, lda, 0, M, 0, K, is_transA, ctx);
......@@ -58,7 +59,6 @@ void sgemm(bool is_transA,
is_bias,
act_param,
ctx);
TargetFree(TargetType::kARM, packed_A);
}
} // namespace math
......
......@@ -39,7 +39,7 @@ DEFINE_int32(power_mode,
DEFINE_int32(threads, 1, "threads num");
DEFINE_int32(warmup, 0, "warmup times");
DEFINE_int32(repeats, 1, "repeats times");
DEFINE_bool(basic_test, false, "do all tests");
DEFINE_bool(basic_test, true, "do all tests");
DEFINE_bool(check_result, true, "check the result");
DEFINE_int32(M, 512, "gemm: M");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册