提交 f6878291 编写于 作者: Z zhaojiaying01

fix gemm assembly bug while compile with clang of NDK17

上级 cab2d143
...@@ -1209,12 +1209,12 @@ void WriteWithAddRelu(int mc, int nc, float *c, float *C, int ldc) { ...@@ -1209,12 +1209,12 @@ void WriteWithAddRelu(int mc, int nc, float *c, float *C, int ldc) {
// C = A * B, batchnorm(C) // C = A * B, batchnorm(C)
void WriteWithBn(int mc, int nc, float *c, float *C, int ldc, float *scale, void WriteWithBn(int mc, int nc, float *c, float *C, int ldc, float *scale,
float *bias) { float *bias) {
int nc1 = nc / 16; int volatile nc1 = nc / 16;
int _nc1 = nc % 16; int _nc1 = nc % 16;
int nc2 = _nc1 / 4; int volatile nc2 = _nc1 / 4;
int nc3 = 16 - 4 * (_nc1 % 4); int volatile nc3 = 16 - 4 * (_nc1 % 4);
int step = 4 * (ldc - nc); int volatile step = 4 * (ldc - nc);
int step1 = 4 * (NC - nc); int volatile step1 = 4 * (NC - nc);
asm volatile( asm volatile(
"subs %[mc], %[mc], #1 \n\t" "subs %[mc], %[mc], #1 \n\t"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册