[Relay][Hashing] Structural hash - incorporate the var type into its hash (#3267)
authorAnimesh Jain <anijain@umich.edu>
Fri, 31 May 2019 08:29:54 +0000 (01:29 -0700)
committerJared Roesch <roeschinc@gmail.com>
Fri, 31 May 2019 08:29:54 +0000 (01:29 -0700)
commit1f4ec9e2216051230f036f405c2d1cff69524061
tree5251ee65837a070bbfb61d78a69481cb69d92cc0
parenta184b32082b03dbc9c531569ff7e2fbc221c3b19
[Relay][Hashing] Structural hash - incorporate the var type into its hash (#3267)

Currently, the BindVar function does not take Var type into account. This causes
two same graph structures with different var shapes to have same hash.
Structural hash is used for keeping track of which operators we have
already compiled. Because of this, two operators with different shapes end up
pointing to same compiled code. The failure is encountered at runtime, where the
expected input shape asserts are not met.
src/relay/ir/hash.cc
tests/python/relay/test_pass_alpha_equal.py