提交 b04f7dee authored 作者: --global's avatar --global

Remove references to tensor.floor_div from opts

上级 512869e3
...@@ -3133,7 +3133,7 @@ def local_mul_switch_sink(node): ...@@ -3133,7 +3133,7 @@ def local_mul_switch_sink(node):
@register_canonicalize @register_canonicalize
@gof.local_optimizer([T.true_div, T.int_div, T.floor_div]) @gof.local_optimizer([T.true_div, T.int_div])
def local_div_switch_sink(node): def local_div_switch_sink(node):
""" """
This optimization makes the folowing changes in the graph: This optimization makes the folowing changes in the graph:
...@@ -3145,8 +3145,7 @@ def local_div_switch_sink(node): ...@@ -3145,8 +3145,7 @@ def local_div_switch_sink(node):
NaN or inf values for cases where the switch returns 0. NaN or inf values for cases where the switch returns 0.
See local_mul_switch_sink for more details. See local_mul_switch_sink for more details.
""" """
if (node.op != T.true_div and node.op != T.int_div if (node.op != T.true_div and node.op != T.int_div):
and node.op != T.floor_div):
return False return False
op = node.op op = node.op
if node.inputs[0].owner and node.inputs[0].owner.op == T.switch: if node.inputs[0].owner and node.inputs[0].owner.op == T.switch:
...@@ -4399,7 +4398,7 @@ def local_mul_to_sqr(node): ...@@ -4399,7 +4398,7 @@ def local_mul_to_sqr(node):
@register_canonicalize @register_canonicalize
@gof.local_optimizer([T.int_div, T.floor_div]) @gof.local_optimizer([T.int_div])
def local_intdiv_by_one(node): def local_intdiv_by_one(node):
"""x // 1 -> x """x // 1 -> x
""" """
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论