24 #ifndef TVM_S_TIR_ANALYSIS_H_
25 #define TVM_S_TIR_ANALYSIS_H_
51 const SBlock& block,
const ffi::Map<Var, Buffer>& buffer_var_map);
62 const SBlock& block,
const ffi::Map<Var, Buffer>& buffer_var_map);
181 namespace transform {
Managed reference class to IRModuleNode.
Definition: module.h:257
Container of constant int that adds more constructors.
Definition: expr.h:601
Analyzer that contains bunch of sub-analyzers.
Definition: analyzer.h:634
Managed reference to BufferRegionNode.
Definition: stmt.h:716
Managed reference to ForNode.
Definition: stmt.h:640
Managed reference to PrimFuncNode.
Definition: function.h:130
A block is a basic schedule unit in TIR.
Definition: stmt.h:799
Managed reference to SBlockNode.
Definition: stmt.h:846
Container of all statements.
Definition: stmt.h:65
IRModule that holds the functions and type definitions.
std::optional< MemCpyDetails > IdentifyMemCpy(const For &loop, arith::Analyzer *analyzer)
Identify whether a For loop is semantically equivalent to MemCpy.
ffi::Map< ffi::String, ffi::Map< ffi::String, Integer > > CalculateAllocatedBytes(const PrimFunc &func)
Calculate the allocated memory per scope in bytes needed inside the TIR PrimFunc.
bool VerifyGPUCode(const PrimFunc &func, ffi::Map< ffi::String, PrimExpr > constraints)
Verify the correctness of a GPU code.
bool VerifyVTCMLimit(const IRModule &mod, Integer limit)
Verifies that the VTCM usage for all prim_funcs in the given IRModule.
bool IsPureFunction(const PrimFunc &func, bool assert_on_error=false)
Analyze the side effect of a function.
double EstimateTIRFlops(const Stmt &stmt)
Estimate the FLOPs of a TIR fragment.
ffi::Array< tvm::transform::Pass > GetVTCMCompactionPasses()
Get the list of lowering passes to calculate the compacted VTCM allocation size.
Definition: axis_group_graph.h:39
ffi::Map< Buffer, ffi::Optional< Stmt > > DetectBufferAccessLCA(const PrimFunc &func)
Detect the lowest common ancestor(LCA) of buffer access, including both high-level access(BufferLoad,...
const tirx::SBlockNode * FindAnchorBlock(const IRModule &mod)
Find the "anchor block" of the given module. We define the anchor block to be the block with (1) an i...
ffi::Array< ffi::Array< BufferRegion > > GetSBlockReadWriteRegion(const SBlock &block, const ffi::Map< Var, Buffer > &buffer_var_map)
Auto detect the block read/write region according to its body stmt. An opaque access will be counted ...
ffi::Array< ffi::Array< BufferRegion > > GetSBlockAccessRegion(const SBlock &block, const ffi::Map< Var, Buffer > &buffer_var_map)
Auto detect the block access region according to its body stmt It will detect the access region as an...
tvm::PrimExpr mod(const tvm::PrimExpr &a, const tvm::PrimExpr &b)
Definition: broadcast.h:308
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition: analyzer.h:37
Helper struct for return value of IdentifyMemCpy.
Definition: analysis.h:131
BufferRegion source
Definition: analysis.h:132
BufferRegion dest
Definition: analysis.h:133
Compilation target object.