tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-tvm] tqchen opened a new pull request #5160: [NODE][IR] Introduce StructuralHash for the Unified IR.
Date Sat, 28 Mar 2020 18:23:37 GMT
tqchen opened a new pull request #5160: [NODE][IR] Introduce StructuralHash for the Unified
IR.
URL: https://github.com/apache/incubator-tvm/pull/5160
 
 
   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.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message