Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion onnxscript/_internal/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,6 @@ def translate_function_def(self, stmt: ast.FunctionDef) -> irbuilder.IRFunction:
self._current_fn = irbuilder.IRFunction(stmt.name, domain)
self._analyzer = analysis.AstAnalyzer(stmt, self._message, self.globals)
fn_ir = self._translate_function_def_common(stmt)
self.this_module.add_function_def(fn_ir)
self._analyzer = None
return fn_ir
raise ValueError(f"Unsupported top-level statement type {type(stmt)!r}.")
Expand Down
4 changes: 0 additions & 4 deletions onnxscript/_internal/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def __new__(cls, domain: str, version: int):
instance = super().__new__(cls)
instance.domain = domain # type: ignore[attr-defined]
instance.version = version # type: ignore[attr-defined]
instance.function_defs = {} # type: ignore[attr-defined]
cls.cache[key] = instance
return instance

Expand Down Expand Up @@ -130,9 +129,6 @@ def __getattr__(self, attr: str) -> Op:
except Exception as exc: # pylint: disable=broad-exception-caught
raise AttributeError(f"Attribute {attr} not found.") from exc

def add_function_def(self, fun):
self.function_defs[fun.name] = fun

def _prepare_inputs(self, _: onnx.defs.OpSchema, *inputs):
"""Trims 'None' values from the end of the inputs list. This is used to support
omitting optional inputs when no more required inputs follow to prepare a valid call
Expand Down
Loading