View source on GitHub |
Transforms local (non-federated) computations into call-dominant form.
tff.framework.to_call_dominant(
comp: tff.framework.ComputationBuildingBlock
) -> tff.framework.ComputationBuildingBlock
Args | |
---|---|
comp
|
A computation to transform. |
Returns | |
---|---|
A transformed but semantically-equivalent comp . The resulting comp will
be in CDF (call-dominant form), as defined by the following CFG:
External -> Intrinsic | Data | Compiled Computation |
Reference(to top-level lambda parameter) |
Reference(to value outside of ExternalCall -> Call(External, CDFElem) CDFElem -> External | Reference to a bound call to an External | Selection(CDFElem, index) | Lambda(Block([bindings for ExternalCalls, CDF)) CDF -> CDFElem | Struct(CDF, ...) | Lambda(CDF) |