Name |
Last commit
|
Last update |
---|---|---|
.. | ||
attrs | ||
qnn | ||
adt.h | ||
analysis.h | ||
base.h | ||
expr.h | ||
expr_functor.h | ||
feature.h | ||
function.h | ||
interpreter.h | ||
op.h | ||
op_attr_types.h | ||
op_strategy.h | ||
pattern_functor.h | ||
transform.h | ||
type.h |
* [NODE][IR] Introduce StructuralHash for the Unified IR. This PR introduces a new way to handle structural hash for the unified IR. - Each object can now register an optional SEqualHash function, which describes how to reduce its structural equality to sequence of hash values. - Optionally, the object can choose to allow labeling of vars(e.g. function parameters) by calling DefHash - We implemented a non-recursive structural hasher that maintains its own stack to traverse te IR. This PR also improves the hash value property from the previous relay's hash utility. In particular, the graph node mode hashs a DAG differently from a tree by attaching an unique occurence index to each graph node. In all of the test cases so far, structural_hash is consistent with structural_equal. - if structrual(x, y) then structural_hash(x) == structural_hash(y) - if structural_hash(x) == structural_hash(y) then highly likely structural_equal(x, y) - hash no collison is found in our testcases. Ideally we should work on automatically generating these functions in the future. * Fix cases for EnvFunc and Array dims * fix testcase * Update src/node/structural_hash.cc Co-Authored-By: 雾雨魔理沙 <lolisa@marisa.moe> Co-authored-by: 雾雨魔理沙 <lolisa@marisa.moe>
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
attrs | Loading commit data... | |
qnn | Loading commit data... | |
adt.h | Loading commit data... | |
analysis.h | Loading commit data... | |
base.h | Loading commit data... | |
expr.h | Loading commit data... | |
expr_functor.h | Loading commit data... | |
feature.h | Loading commit data... | |
function.h | Loading commit data... | |
interpreter.h | Loading commit data... | |
op.h | Loading commit data... | |
op_attr_types.h | Loading commit data... | |
op_strategy.h | Loading commit data... | |
pattern_functor.h | Loading commit data... | |
transform.h | Loading commit data... | |
type.h | Loading commit data... |