diff --git a/onnxscript/rewriter/_ir_utils.py b/onnxscript/rewriter/_ir_utils.py index de293a74d..41d05f14d 100644 --- a/onnxscript/rewriter/_ir_utils.py +++ b/onnxscript/rewriter/_ir_utils.py @@ -20,7 +20,7 @@ def visit(node: ir.Node, depth): if backward: for inp in node.inputs: if inp is not None and inp.producer() is not None: - visit(inp.producer(), depth + 1) + visit(inp.producer(), depth + 1) # type: ignore[arg-type] else: for out in node.outputs: for consumer, _ in out.uses(): @@ -29,7 +29,7 @@ def visit(node: ir.Node, depth): if isinstance(x, ir.Node): visit(x, 0) elif isinstance(x, ir.Value) and x.producer() is not None: - visit(x.producer(), 0) + visit(x.producer(), 0) # type: ignore[arg-type] if slice: graph = slice[0].graph if graph: