提交 6bd57c9a 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!106 GPU update cast

Merge pull request !106 from VectorSL/gpu-cast
......@@ -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.
先完成此消息的编辑!
想要评论请 注册