tvm
Classes | Namespaces | Enumerations | Functions
compute_dag.h File Reference

The auto-scheduler's computational graph and related program analyses. More...

#include <tvm/auto_scheduler/loop_state.h>
#include <tvm/runtime/c_runtime_api.h>
#include <tvm/te/schedule.h>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
Include dependency graph for compute_dag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::auto_scheduler::AccessAnalyzerNode
 Static analyzer for a ComputeDAG. More...
 
class  tvm::auto_scheduler::AccessAnalyzer
 Managed reference to AccessAnalyzerNode. More...
 
class  tvm::auto_scheduler::ComputeDAGNode
 The auto-scheduler's computational graph and related program analyses. More...
 
class  tvm::auto_scheduler::ComputeDAG
 Managed reference to ComputeDAGNode. More...
 

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 
 tvm::auto_scheduler
 

Enumerations

enum class  tvm::auto_scheduler::LayoutRewriteOption : int { tvm::auto_scheduler::NoRewrite = 0 , tvm::auto_scheduler::InsertTransformStage = 1 , tvm::auto_scheduler::RewriteForPreTransformed = 2 }
 Options for applying layout rewrite. This is an optimization to rewrite the layout of input tensors according to the schedule we get. More...
 

Functions

Array< PrimExpr > tvm::auto_scheduler::GetShapeFromRewrittenLayout (String rewritten_layout, Array< String > axis_names)
 Get the orginal shape from a rewritten layout string. More...
 

Detailed Description

The auto-scheduler's computational graph and related program analyses.

We convert a compute declaration described by tvm.compute (could be a single operator or a subgraph) to a ComputeDAG. It keeps the input/output tensors, all operations in the DAG, and some static analysis results for the DAG (e.g. the total float operation count, consumer/producer relations of operations, whether an operation stage should be tiled/compute inlined ...). These analyses can help the search policy to make decisions during the search. ComputeDAG is also responsible for the interaction between auto-scheduler's LoopState and TVM schedule (e.g. applying the LoopState transform steps to a TVM schedule, providing LoopState with extra information got from TVM schedule ...).