提交 f456f5fc 编写于 作者: V VectorSL

gpu update cast:fp16->int32

上级 8f9af74f
......@@ -22,4 +22,6 @@ def Cast(x, dst_type):
"""cast."""
if x.dtype == "int64" and dst_type == "float16":
x = cast.cast(x, "float32")
if x.dtype == "float16" and dst_type == "int32":
x = topi.trunc(x)
return cast.cast(x, dst_type)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册