提交 54ae37b6 编写于 作者: Z zp7 提交者: Yanzhan Yang

fix crash (#2139)

上级 cc851a38
...@@ -1518,10 +1518,12 @@ void sgemm_conv_6x8(const float* A_packed, const float* B, const float* bias, ...@@ -1518,10 +1518,12 @@ void sgemm_conv_6x8(const float* A_packed, const float* B, const float* bias,
(l2_cache - (MBLOCK_OTH * K)) / (sizeof(float) * (K + MBLOCK_OTH)); (l2_cache - (MBLOCK_OTH * K)) / (sizeof(float) * (K + MBLOCK_OTH));
x_block /= NBLOCK; x_block /= NBLOCK;
x_block *= NBLOCK; x_block *= NBLOCK;
int x_num = (N + (x_block - 1)) / x_block; if (x_block != 0) {
x_block = (N + x_num - 1) / x_num; int x_num = (N + (x_block - 1)) / x_block;
x_block = (x_block + NBLOCK - 1) / NBLOCK; x_block = (N + x_num - 1) / x_num;
x_block *= NBLOCK; x_block = (x_block + NBLOCK - 1) / NBLOCK;
x_block *= NBLOCK;
}
x_block = x_block < NBLOCK ? NBLOCK : x_block; x_block = x_block < NBLOCK ? NBLOCK : x_block;
int k_pre = ((K + KBLOCK - 1) / KBLOCK) - 1; int k_pre = ((K + KBLOCK - 1) / KBLOCK) - 1;
int tail_pre = (K & (KBLOCK - 1)); int tail_pre = (K & (KBLOCK - 1));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册