8000 [export] Remove CallSpec (#117671) · pytorch/pytorch@c54cd71 · GitHub
[go: up one dir, main page]

Skip to content

Commit c54cd71

Browse files
angelayifacebook-github-bot
authored andcommitted
[export] Remove CallSpec (#117671)
Summary: X-link: pytorch/executorch#1618 This is not really being used anywhere Test Plan: CI Differential Revision: D52842563
1 parent 8841d26 commit c54cd71

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

torch/_export/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@
7272
from torch.fx.graph import _PyTreeCodeGen, _PyTreeInfo
7373
from torch.utils._sympy.value_ranges import ValueRangeError, ValueRanges
7474

75-
from .exported_program import (
76-
CallSpec,
77-
)
7875
from .passes.add_runtime_assertions_for_constraints_pass import (
7976
_AddRuntimeAssertionsForInlineConstraintsPass,
8077
)

torch/_export/exported_program.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import dataclasses
2-
from typing import Optional
31
import warnings
42

53

64
import torch
75
import torch.fx
8-
import torch.utils._pytree as pytree
96

107

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

3431

35-
# Information to maintain user calling/returning specs
36-
@dataclasses.dataclass
37-
class CallSpec:
38-
in_spec: Optional[pytree.TreeSpec]
39-
out_spec: Optional[pytree.TreeSpec]
40-
41-
4232
def _create_graph_module_for_export(root, graph):
4333
try:
4434
gm = torch.fx.GraphModule(root, graph)

0 commit comments

Comments
 (0)
0