File tree Expand file tree Collapse file tree 1 file changed +2
-16
lines changed
Expand file tree Collapse file tree 1 file changed +2
-16
lines changed Original file line number Diff line number Diff line change 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.
3131def _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 ()
You can’t perform that action at this time.
0 commit comments