未验证 提交 2b53c68c 编写于 作者: L Linjie Chen 提交者: GitHub

Fix output dtype of elementwise_div (#40890)

* fix outpu dtype of elementwise_div

* fix ci

* fix ci
上级 ea5b2f26
...@@ -264,6 +264,10 @@ def monkey_patch_math_varbase(): ...@@ -264,6 +264,10 @@ def monkey_patch_math_varbase():
self = other_var self = other_var
other_var = tmp other_var = tmp
if op_type == 'elementwise_div' and self.dtype in _supported_int_dtype_:
self = astype(self, 'float32')
other_var = astype(other_var, 'float32')
# 4. calculation # 4. calculation
axis = -1 axis = -1
math_op = getattr(_C_ops, op_type) math_op = getattr(_C_ops, op_type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册