Internal handler that defines custom behaviors..
More...
#include <structural_equal.h>
Internal handler that defines custom behaviors..
◆ PathTracingData
◆ DeferFail()
virtual void tvm::SEqualReducer::Handler::DeferFail |
( |
const ObjectPathPair & |
mismatch_paths | ) |
|
|
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.
◆ MapLhsToRhs()
Lookup the graph node equal map for vars that are already mapped.
This is an auxiliary method to check the Map<Var, Value> equality.
- Parameters
-
- Returns
- The corresponding rhs value if any, nullptr if not available.
◆ MarkGraphNode()
virtual void tvm::SEqualReducer::Handler::MarkGraphNode |
( |
| ) |
|
|
pure virtual |
Mark current comparison as graph node equal comparison.
◆ SEqualReduce()
Reduce condition to equality of lhs and rhs.
- Parameters
-
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. |
- Returns
- false if there is an immediate failure, true otherwise.
- Note
- This function may save the equality condition of (lhs == rhs) in an internal stack and try to resolve later.
The documentation for this class was generated from the following file: