tvm
|
Internal handler that defines custom behaviors.. More...
#include <structural_equal.h>
Public Member Functions | |
virtual bool | SEqualReduce (const ObjectRef &lhs, const ObjectRef &rhs, bool map_free_vars, const Optional< ObjectPathPair > ¤t_paths)=0 |
Reduce condition to equality of lhs and rhs. More... | |
virtual void | DeferFail (const ObjectPathPair &mismatch_paths)=0 |
Mark the comparison as failed, but don't fail immediately. More... | |
virtual bool | IsFailDeferralEnabled ()=0 |
Check if fail defferal is enabled. More... | |
virtual ObjectRef | MapLhsToRhs (const ObjectRef &lhs)=0 |
Lookup the graph node equal map for vars that are already mapped. More... | |
virtual void | MarkGraphNode ()=0 |
Mark current comparison as graph node equal comparison. More... | |
Protected Types | |
using | PathTracingData = SEqualReducer::PathTracingData |
Internal handler that defines custom behaviors..
|
protected |
|
pure virtual |
Mark the comparison as failed, but don't fail immediately.
This is useful for producing better error messages when comparing containers. For example, if two array sizes mismatch, it's better to mark the comparison as failed but compare array elements anyway, so that we could find the true first mismatch.
Implemented in tvm::SEqualHandlerDefault.
|
pure virtual |
Check if fail defferal is enabled.
Implemented in tvm::SEqualHandlerDefault.
Lookup the graph node equal map for vars that are already mapped.
This is an auxiliary method to check the Map<Var, Value> equality.
lhs | an lhs value. |
Implemented in tvm::SEqualHandlerDefault.
|
pure virtual |
Mark current comparison as graph node equal comparison.
Implemented in tvm::SEqualHandlerDefault.
|
pure virtual |
Reduce condition to equality of lhs and rhs.
lhs | The left operand. |
rhs | The right operand. |
map_free_vars | Whether do we allow remap variables if possible. |
current_paths | Optional paths to lhs and rhs objects, for error traceability. |
Implemented in tvm::SEqualHandlerDefault.