提交 7b4e68f1 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix conversion of float16 constants.

上级 0e1602f4
...@@ -3832,8 +3832,10 @@ class Compositef32(object): ...@@ -3832,8 +3832,10 @@ class Compositef32(object):
if i not in mapping: if i not in mapping:
assert type(i) is ScalarConstant assert type(i) is ScalarConstant
if i.type == float16: if i.type == float16:
i = ScalarConstant(float32, i.data) ni = ScalarConstant(float32, i.data)
mapping[i] = i else:
ni = i
mapping[i] = ni
if type(node.op) in self.special: if type(node.op) in self.special:
self.special[type(node.op)](node, mapping) self.special[type(node.op)](node, mapping)
continue continue
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论