26 #ifndef TVM_TIR_INDEX_MAP_H_ 27 #define TVM_TIR_INDEX_MAP_H_ 143 String ToPythonString()
const;
146 v->Visit(
"initial_indices", &initial_indices);
147 v->Visit(
"final_indices", &final_indices);
148 v->Visit(
"inverse_index_map", &inverse_index_map);
157 hash_reduce.
DefHash(initial_indices);
158 hash_reduce(final_indices);
161 static constexpr
const char* _type_key =
"tir.IndexMap";
162 static constexpr
const bool _type_has_method_sequal_reduce =
true;
163 static constexpr
const bool _type_has_method_shash_reduce =
true;
211 std::pair<IndexMap, PrimExpr> NonSurjectiveInverse(
Array<Range> initial_ranges)
const;
219 #endif // TVM_TIR_INDEX_MAP_H_ void SHashReduce(SHashReducer hash_reduce) const
Definition: index_map.h:156
bool DefEqual(const ObjectRef &lhs, const ObjectRef &rhs)
Reduce condition to comparison of two definitions, where free vars can be mapped. ...
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
A Reducer class to reduce the structural hash value.
Definition: structural_hash.h:102
Array< PrimExpr > final_indices
Expressions defining the indices after remapping.
Definition: index_map.h:71
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal
Array< Var > initial_indices
Variables representing the indices prior to remapping.
Definition: index_map.h:59
Optional< ObjectRef > inverse_index_map
The inverse index map.
Definition: index_map.h:83
base class of all object containers.
Definition: object.h:167
Runtime Array container types.
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
void VisitAttrs(AttrVisitor *v)
Definition: index_map.h:145
IndexMapNode()
Default constructor.
Definition: index_map.h:91
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Definition: index_map.h:167
Reference to string objects.
Definition: string.h:97
Please refer to TypedPackedFunc<R(Args..)>.
Definition: packed_func.h:60
Tensor shape(const Tensor &src, DataType dtype, const std::string name="T_shape", const std::string tag=kInjective)
Get the shape of input tensor.
Definition: transform.h:1758
#define TVM_DEFINE_OBJECT_REF_METHODS(TypeName, ParentType, ObjectName)
Definition: object.h:713
Base class of all object reference.
Definition: object.h:511
A managed object in the TVM runtime.
#define TVM_DECLARE_FINAL_OBJECT_INFO(TypeName, ParentType)
helper macro to declare type information in a final class.
Definition: object.h:671
Optional container that to represent to a Nullable variant of T.
Definition: optional.h:51
constexpr runtime::NullOptType NullOpt
Definition: optional.h:160
bool SEqualReduce(const IndexMapNode *other, SEqualReducer equal) const
Definition: index_map.h:151
Analyzer that contains bunch of sub-analyzers.
Definition: analyzer.h:423
Defines a mapping between two representations of indices into a buffer.
Definition: index_map.h:52
void DefHash(const ObjectRef &key) const
Push hash of key to the current sequence of hash values.
Definition: structural_hash.h:179