tf_1.8_xla_doc
|
Functions | |
Status | AddCopiesForWhile (const HloAliasAnalysis &alias_analysis, HloInstruction *xla_while) |
Status | AddCopiesForConditional (const HloAliasAnalysis &alias_analysis, HloInstruction *conditional) |
Status | AddCopiesToResolveInterference (HloModule *module) |
Status xla::anonymous_namespace{copy_insertion.cc}::AddCopiesForConditional | ( | const HloAliasAnalysis & | alias_analysis, |
HloInstruction * | conditional | ||
) |
Google docs:
We add copies for all the indices of the true and false computaiton roots, in order to resolve interference. We later rely on the CopyRemover to drop the unnecessary ones.
Status xla::anonymous_namespace{copy_insertion.cc}::AddCopiesForWhile | ( | const HloAliasAnalysis & | alias_analysis, |
HloInstruction * | xla_while | ||
) |
Google docs in short:
Add kCopy instructions around the given kWhile instruction to eliminate any possible live range interference of HLO values assuming a dependency-based ordering (HloDependencyOrdering). Copies are added conservatively. There likely are copies which are not strictly necessary, but there are removed later in the pass via CopyRemover.
Status xla::anonymous_namespace{copy_insertion.cc}::AddCopiesToResolveInterference | ( | HloModule * | module | ) |
Google docs:
Add kCopy instructions to the given module to guarantee there is no live-range interference. Generally interference can only occur around kWhile instructions which have update-in-place semantics.
For all the kWhile instruction, call AddCopiesForWhile()
For all the kConditional instruction, call AddCopiesForConditional()