@@ -838,19 +838,16 @@ def call_op(
838838
839839 def call (
840840 self ,
841- function : ir .Function | onnxscript . OnnxFunction ,
841+ function : ir .Function ,
842842 * args ,
843843 _outputs : int | Sequence [str | ir .Value ] | None = None ,
844844 ** kwargs ,
845845 ):
846846 """Call a function as a single function node."""
847847 if isinstance (function , ir .Function ):
848848 graph = function .graph
849- elif isinstance (function , onnxscript .OnnxFunction ):
850- graph = function .graph ()
851- function = function .function_ir
852849 else :
853- raise TypeError ("Function must be an ir.Function or onnxscript.OnnxFunction " )
850+ raise TypeError ("Function must be an ir.Function" )
854851
855852 if _outputs is None :
856853 _outputs = len (graph .outputs )
@@ -869,6 +866,7 @@ def call(
869866 outputs = output_values ,
870867 domain = function .domain ,
871868 name = node_name ,
869+ overload = function .overload ,
872870 )
873871 # Attach scope metadata to the node
874872 node .metadata_props ["namespace" ] = self ._build_namespace ()
@@ -899,7 +897,7 @@ def call_inline(
899897 if _outputs is not None :
900898 if len (_outputs ) != len (graph .outputs ):
901899 raise ValueError (
902- f"Number of provided output names { _outputs } does not match "
900+ f"Number of rovided output names { _outputs } does not match "
903901 f"number of function outputs { len (graph .outputs )} ."
904902 )
905903 # Compute desired output names before pushing prefix scope so they
0 commit comments