Skip to content

Commit

Permalink
[export] Remove CallSpec (pytorch#117671)
Browse files Browse the repository at this point in the history
Summary:

X-link: pytorch/executorch#1618

This is not really being used anywhere

Test Plan: CI

Differential Revision: D52842563
  • Loading branch information
angelayi authored and facebook-github-bot committed Jan 17, 2024
1 parent 8841d26 commit c54cd71
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
3 changes: 0 additions & 3 deletions torch/_export/__init__.py
Expand Up @@ -72,9 +72,6 @@
from torch.fx.graph import _PyTreeCodeGen, _PyTreeInfo
from torch.utils._sympy.value_ranges import ValueRangeError, ValueRanges

from .exported_program import (
CallSpec,
)
from .passes.add_runtime_assertions_for_constraints_pass import (
_AddRuntimeAssertionsForInlineConstraintsPass,
)
Expand Down
10 changes: 0 additions & 10 deletions torch/_export/exported_program.py
@@ -1,11 +1,8 @@
import dataclasses
from typing import Optional
import warnings


import torch
import torch.fx
import torch.utils._pytree as pytree


# TODO(ycao): This is added to avoid breaking existing code temporarily.
Expand All @@ -32,13 +29,6 @@
]


# Information to maintain user calling/returning specs
@dataclasses.dataclass
class CallSpec:
in_spec: Optional[pytree.TreeSpec]
out_spec: Optional[pytree.TreeSpec]


def _create_graph_module_for_export(root, graph):
try:
gm = torch.fx.GraphModule(root, graph)
Expand Down

0 comments on commit c54cd71

Please sign in to comment.