提交 ddeb09ca 编写于 作者: S smilejames 提交者: GitHub

Merge pull request #861 from yangfei963158659/develop

repair bug of bias is nullptr
...@@ -2809,10 +2809,15 @@ void Sgemm(int m, int n, int k, float alpha, const float *A, int lda, ...@@ -2809,10 +2809,15 @@ void Sgemm(int m, int n, int k, float alpha, const float *A, int lda,
#else #else
PackMatrixA_6r(mc, KC, mc % MR, &A(i, 0), lda, packedA); PackMatrixA_6r(mc, KC, mc % MR, &A(i, 0), lda, packedA);
#endif #endif
if (bias == nullptr) {
InnerKernelWithBias(mc, nc, alpha, packedA, packedB, beta, packedC,
&C(i, j), ldc, relu, nullptr);
} else {
InnerKernelWithBias(mc, nc, alpha, packedA, packedB, beta, packedC, InnerKernelWithBias(mc, nc, alpha, packedA, packedB, beta, packedC,
&C(i, j), ldc, relu, bias + i); &C(i, j), ldc, relu, bias + i);
} }
} }
}
paddle_mobile::memory::Free(packedA); paddle_mobile::memory::Free(packedA);
paddle_mobile::memory::Free(packedB); paddle_mobile::memory::Free(packedB);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册