23 #ifndef TVM_PARSER_SOURCE_MAP_H_ 24 #define TVM_PARSER_SOURCE_MAP_H_ 58 v->Visit(
"source_name", &source_name);
59 v->Visit(
"source", &source);
93 static constexpr
const char*
_type_key =
"SourceMap";
101 TVM_DLL
SourceMap(std::initializer_list<std::pair<SourceName, Source>> source_map)
109 ICHECK(
get() !=
nullptr);
119 #endif // TVM_PARSER_SOURCE_MAP_H_ SourceMap()
Definition: source_map.h:104
Stores locations in frontend source that generated a node.
Definition: source_map.h:81
A Reducer class to reduce the structural equality result of two objects.
Definition: structural_equal.h:124
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
static constexpr const char * _type_key
Definition: source_map.h:62
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal
std::vector< std::pair< int, int > > line_map
A mapping of line breaks into the raw source.
Definition: source_map.h:54
base class of all object containers.
Definition: object.h:167
bool SEqualReduce(const SourceMapNode *other, SEqualReducer equal) const
Definition: source_map.h:89
Definition: source_map.h:97
Span information for debugging purposes.
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
The source name of a file span.
Definition: span.h:62
void VisitAttrs(AttrVisitor *v)
Definition: source_map.h:57
SourceMapNode * operator->()
Definition: source_map.h:108
Reference to string objects.
Definition: string.h:97
SourceName source_name
The source name.
Definition: source_map.h:48
Map< SourceName, Source > source_map
The source mapping.
Definition: source_map.h:84
void VisitAttrs(AttrVisitor *v)
Definition: source_map.h:87
SourceMap(std::initializer_list< std::pair< SourceName, Source >> source_map)
Definition: source_map.h:101
Base class of all object reference.
Definition: object.h:511
Definition: source_map.h:66
TVM_DECLARE_FINAL_OBJECT_INFO(SourceNode, Object)
Map container of NodeRef->NodeRef in DSL graph. Map implements copy on write semantics, which means map is mutable but copy will happen when array is referenced in more than two places.
Definition: map.h:1271
String source
The raw source.
Definition: source_map.h:51
Definition: source_map.h:45
#define TVM_DEFINE_NOTNULLABLE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:728
Type-erased function used across TVM API.
This file defines the TVM global function registry.