未验证 提交 1fe7b296 编写于 作者: J Juncheng 提交者: GitHub

Fix __hne in BinaryFuncFloorMod (#3788)

Co-authored-by: Noneflow-bot <69100618+oneflow-bot@users.noreply.github.com>
上级 066c36bf
......@@ -270,7 +270,7 @@ struct BinaryFuncFloorMod<half> final {
#if __CUDA_ARCH__ >= 530
const half trunc_mod = __float2half(fmodf(__half2float(x), __half2float(y)));
return __hne(trunc_mod, GetZeroVal<half>())
&& __hne(__hlt(y, GetZeroVal<half>()), __hlt(trunc_mod, half(0)))
&& __hlt(y, GetZeroVal<half>()) != __hlt(trunc_mod, half(0))
? trunc_mod + y
: trunc_mod;
#else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册