tf_1.8_xla_doc
Public Member Functions | List of all members
xla::HloPassPipeline Class Reference

#include <hlo_pass_pipeline.h>

Inherits HloPassInterface.

Public Member Functions

 HloPassPipeline (const string &name)
 
template<typename T , typename... Args>
T & AddPass (Args &&... args)
 Add a pass to the pipeline. It should be called with the arguments for the pass constructor: More...
 
template<typename T , typename... Args>
T & AddInvariantChecker (Args &&... args)
 
StatusOr< bool > Run (HloModule *module) override
 Run the Hlo pipeline by invoking each class' Run method. More...
 

Detailed Description

Pipeline of HLO passes.

Constructor & Destructor Documentation

◆ HloPassPipeline()

xla::HloPassPipeline::HloPassPipeline ( const string &  name)
inlineexplicit

Only constructor of this class

Member Function Documentation

◆ AddInvariantChecker()

template<typename T , typename... Args>
T& xla::HloPassPipeline::AddInvariantChecker ( Args &&...  args)
inline

Google docs:

Add an invariant-checking pass to the pipeline. It will be run before and after each HLO pass. The invariant checking pass must not mutate the graph (it is required to always return "false" from its Run() method).

Here is the caller graph for this function:

◆ AddPass()

template<typename T , typename... Args>
T& xla::HloPassPipeline::AddPass ( Args &&...  args)
inline

Add a pass to the pipeline. It should be called with the arguments for the pass constructor:

pipeline.AddPass<FooPass>(constructor_arg1, constructor_arg2); Returns a reference to the added pass.

Here is the caller graph for this function:

◆ Run()

StatusOr< bool > xla::HloPassPipeline::Run ( HloModule module)
override

Run the Hlo pipeline by invoking each class' Run method.

  1. Ignore passes disabled by --xla_disable_hlo_passes
  2. Check all invariant_checker does not change the graph
  3. If dump options is set then run xla::anonymous_namespace{hlo_pass_pipeline.cc}::DumpModuleProto to save module to file.
  4. For each pass
    1. xla::anonymous_namespace{hlo_pass_pipeline.cc}::DumpModuleGraph
    2. Run the pass
    3. xla::anonymous_namespace{hlo_pass_pipeline.cc}::DumpModuleProto if dump proto per pass is set
  5. xla::anonymous_namespace{hlo_pass_pipeline.cc}::DumpModuleGraph
Here is the caller graph for this function:

The documentation for this class was generated from the following files: