pymc.SymbolicRandomVariable.clone_with_inner_graph#
- SymbolicRandomVariable.clone_with_inner_graph(inner_fgraph)#
Return a copy of this op whose inner graph is
inner_fgraph.Used by the
ofg_inner_graphrewrite to bake an already-optimized inner graph into a NEW op without mutatingself.inner_fgraphis the rewrite’s optimized graph and already carries the ordering we must keep: when it has baked inplace ops itsDestroyHandlerdefines a destroy-aware toposort (every reader of a destroyed buffer runs before the op that destroys it). We therefore assign it directly –freezere-roots it on nominal inputs by position and bakes that order into the frozen graph (and each node’stopo_idx). Routing it throughconstruct_nominal_fgraphinstead would rebuild and re-toposort, losing the destroy-aware order. MirrorsScan.clone_with_inner_graph.