24 #ifndef TVM_IR_SI_BUILDER_H_
25 #define TVM_IR_SI_BUILDER_H_
32 #include <unordered_set>
51 explicit SIBuilder(
const std::initializer_list<Span>& init);
60 template <typename T, typename = std::enable_if_t<std::is_base_of<BaseExpr, T>::value>>
83 template <typename T, typename = std::enable_if_t<std::is_base_of<BaseExpr, T>::value>>
85 const T& entry,
const std::unordered_set<T, ObjectPtrHash, ObjectPtrEqual>& inputs)
const;
89 const std::unordered_set<PrimExpr, ObjectPtrHash, ObjectPtrEqual>& inputs)
const;
92 const std::unordered_set<tir::Stmt, ObjectPtrHash, ObjectPtrEqual>& inputs)
const;
96 std::unique_ptr<Impl> impl_;
98 std::unique_ptr<Impl> CreateImpl(
const Span& span);
Source Information Builder, SIBuilder provides helper APIs for filling spans, particularly useful for...
Definition: si_builder.h:40
Span Build() const
build a span of source information, which is based on the given span or subgraph.
SIBuilder & operator=(const SIBuilder &)=delete
SIBuilder(const Span &span=Span())
Create SIBuilder from a given span.
SIBuilder(const Array< Span > &spans=Array< Span >())
Create SIBuilder from a given span sequence.
void RecursivelyFillSpan(const tir::Stmt &entry, const std::unordered_set< tir::Stmt, ObjectPtrHash, ObjectPtrEqual > &inputs) const
SIBuilder(const tir::Stmt &entry, const tvm::Array< PrimExpr > &inputs={})
SIBuilder(const tir::Stmt &entry, const tvm::Array< tir::Stmt > &inputs={})
SIBuilder(const SIBuilder &)=delete
SIBuilder(const T &entry, const tvm::Array< T > &inputs={})
Create SIBuilder via a subgraph, Will construct span based on the exprs in the subgraph....
void RecursivelyFillSpan(const tir::Stmt &entry, const std::unordered_set< PrimExpr, ObjectPtrHash, ObjectPtrEqual > &inputs) const
SIBuilder(const std::initializer_list< Span > &init)
void RecursivelyFillSpan(const T &entry, const std::unordered_set< T, ObjectPtrHash, ObjectPtrEqual > &inputs) const
Recursively fill all span of exprs in subgraph from entry until inputs.
Definition: source_map.h:120
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Container of all statements.
Definition: stmt.h:59
tvm::Span Span
Definition: base.h:65
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
Relay expression language.
A more powerful visitor which enables defining arbitrary function signatures with type based dispatch...