提交 2691c23f authored 作者: Frederic's avatar Frederic

fix ceil_intdiv crash when the input are not tensor variable

(like when they are int).
上级 c36ce7b0
...@@ -2839,7 +2839,7 @@ def ceil_intdiv(a, b): ...@@ -2839,7 +2839,7 @@ def ceil_intdiv(a, b):
# force their upcast to int. # force their upcast to int.
div = int_div(a, b) div = int_div(a, b)
ret = cast(neq(a % b, 0), div.dtype) + div ret = cast(neq(a % b, 0), div.dtype) + div
assert ret.dtype == scal.upcast(a.dtype, b.dtype) assert ret.dtype == scal.upcast(div.owner.inputs[0], div.owner.inputs[1])
return ret return ret
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论