Skip to content

Commit f41f6cd

Browse files
author
Ali Alshaarawy
committed
remove unused update_swapmap
1 parent a1fdaf7 commit f41f6cd

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

thunder/executors/passes.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,6 @@
2929
# Transforms a trace by determining which execution transforms to call given the list of executors in priority order
3030
# This pass tries to preserve the original trace and proxies.
3131
def _transform_for_operator_executor_execution(trace: TraceCtx, executors_list: Sequence[Executor]) -> TraceCtx:
32-
start_time_ns = time.perf_counter_ns()
33-
34-
swapmap: dict[Variable, Proxy] = {}
35-
36-
def update_swapmap(o: Any, no: Any) -> None:
37-
if isinstance(o, Proxy):
38-
check(
39-
isinstance(no, Proxy),
40-
lambda: f"Expected an execution transform to produce outputs with the same type, but found {type(o)} and {type(no)}",
41-
)
42-
43-
vo = variableify(o)
44-
vno = variableify(no)
45-
if vo == vno:
46-
return
47-
swapmap[vno] = o
4832

4933
# This processes the bsyms to map symbols to operator executors:
5034
# - if a bsym has a python impl, that will be called, so we can keep it.
@@ -104,6 +88,8 @@ def process_bsym(self, bsym):
10488
### OUTPUTS to map
10589
self.add_unprocessed_bsyms(bsym.subsymbols[:])
10690

91+
start_time_ns = time.perf_counter_ns()
92+
10793
extrace, _ = OpExProcessor(trace)()
10894

10995
end_time_ns = time.perf_counter_ns()

0 commit comments

Comments
 (0)