tf_1.8_xla_doc
Functions
xla::anonymous_namespace{copy_insertion.cc} Namespace Reference

Functions

Status AddCopiesForWhile (const HloAliasAnalysis &alias_analysis, HloInstruction *xla_while)
 
Status AddCopiesForConditional (const HloAliasAnalysis &alias_analysis, HloInstruction *conditional)
 
Status AddCopiesToResolveInterference (HloModule *module)
 

Function Documentation

◆ AddCopiesForConditional()

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.

Here is the caller graph for this function:

◆ AddCopiesForWhile()

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.

Here is the caller graph for this function:

◆ AddCopiesToResolveInterference()

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()

Here is the call graph for this function: