The major new thing here is RealOps.inlinable which walks the DAG to determine if there are any sub-graphs which a) contain at least one parameter b) contain at least one placeholder and c) have as their root node a non-linear operation like log, exp, pow, etc.
If there are not any such sub-graphs, then it should be possible to simplify the sum across all N placeholder rows to a single O(1) function of the parameters. If any such subgraphs do exist, then we need to keep it in placeholder form and do the N independent evaluations.
This PR also tweaks PartialEvaluator to be specifically for inlining placeholder values (and removes that recently-introduced capability from Evaluator).
The major new thing here is
RealOps.inlinable
which walks the DAG to determine if there are any sub-graphs which a) contain at least one parameter b) contain at least one placeholder and c) have as their root node a non-linear operation like log, exp, pow, etc.If there are not any such sub-graphs, then it should be possible to simplify the sum across all N placeholder rows to a single O(1) function of the parameters. If any such subgraphs do exist, then we need to keep it in placeholder form and do the N independent evaluations.
This PR also tweaks PartialEvaluator to be specifically for inlining placeholder values (and removes that recently-introduced capability from Evaluator).