未验证 提交 99d32eb5 编写于 作者: W whs 提交者: GitHub

Fix fake quant cuda kernel (#41305) (#41588)

上级 78cc2923
......@@ -305,7 +305,7 @@ __global__ void ChannelClipAndQuantKernelQuantAxisN(
int64_t idx = blockDim.x * blockIdx.x + threadIdx.x;
for (int64_t i = idx; i < n; i += blockDim.x * gridDim.x) {
T s = scale[(i / quant_stride) % nScale];
T inv_s = 1.0 / s;
T inv_s = inverse(s);
T x = in[i];
T v = x > s ? s : x;
v = v < -s ? -s : v;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册