oryx.core.interpreters.propagate.propagate
Stay organized with collections
Save and categorize content based on your preferences.
Propagates cells in a Jaxpr using a set of rules.
oryx.core.interpreters.propagate.propagate(
cell_type: Type[oryx.core.interpreters.propagate.Cell
],
rules: Dict[jax_core.Primitive, PropagationRule],
jaxpr: pe.Jaxpr,
constcells: List[oryx.core.interpreters.propagate.Cell
],
incells: List[oryx.core.interpreters.propagate.Cell
],
outcells: List[oryx.core.interpreters.propagate.Cell
],
reducer: Callable[[Environment, Equation, State, State], State] = identity_reducer,
initial_state: State = None
) -> Tuple[Environment, State]
Args |
cell_type
|
used to instantiate literals into cells
|
rules
|
maps JAX primitives to propagation rule functions
|
jaxpr
|
used to construct the propagation graph
|
constcells
|
used to populate the Jaxpr's constvars
|
incells
|
used to populate the Jaxpr's invars
|
outcells
|
used to populate the Jaxpr's outcells
|
reducer
|
An optional callable used to reduce over the state at each
equation in the Jaxpr. reducer takes in (env, eqn, state, new_state)
as arguments and should return an updated state. The new_state value
is provided by each equation.
|
initial_state
|
The initial state value used in the reducer
|
Returns |
The Jaxpr environment after propagation has terminated
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-05-23 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-05-23 UTC."],[],[]]