|
27 | 27 | from pytensor.graph.fg import FunctionGraph, Output
|
28 | 28 | from pytensor.graph.op import Op
|
29 | 29 | from pytensor.graph.rewriting.unify import OpPattern, Var, convert_strs_to_vars
|
30 |
| -from pytensor.graph.traversal import applys_between, io_toposort, vars_between |
| 30 | +from pytensor.graph.traversal import applys_between, toposort, vars_between |
31 | 31 | from pytensor.graph.utils import AssocList, InconsistencyError
|
32 | 32 | from pytensor.misc.ordered_set import OrderedSet
|
33 | 33 | from pytensor.utils import flatten
|
@@ -2010,7 +2010,7 @@ def apply(self, fgraph, start_from=None):
|
2010 | 2010 | callback_before = fgraph.execute_callbacks_time
|
2011 | 2011 | nb_nodes_start = len(fgraph.apply_nodes)
|
2012 | 2012 | t0 = time.perf_counter()
|
2013 |
| - q = deque(io_toposort(fgraph.inputs, start_from)) |
| 2013 | + q = deque(toposort(start_from)) |
2014 | 2014 | io_t = time.perf_counter() - t0
|
2015 | 2015 |
|
2016 | 2016 | def importer(node):
|
@@ -2341,7 +2341,7 @@ def apply_cleanup(profs_dict):
|
2341 | 2341 | changed |= apply_cleanup(iter_cleanup_sub_profs)
|
2342 | 2342 |
|
2343 | 2343 | topo_t0 = time.perf_counter()
|
2344 |
| - q = deque(io_toposort(fgraph.inputs, start_from)) |
| 2344 | + q = deque(toposort(start_from)) |
2345 | 2345 | io_toposort_timing.append(time.perf_counter() - topo_t0)
|
2346 | 2346 |
|
2347 | 2347 | nb_nodes.append(len(q))
|
|
0 commit comments