Skip to content

Commit

Permalink
a few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiics committed Mar 29, 2020
1 parent de405dd commit 5762186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion include/tvm/ir/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,9 @@ class IncompleteTypeNode : public TypeNode {
}

bool SEqualReduce(const IncompleteTypeNode* other, SEqualReducer equal) const {
return equal(kind, other->kind);
return
equal(kind, other->kind) &&
equal.FreeVarEqualImpl(this, other);
}

void SHashReduce(SHashReducer hash_reduce) const {
Expand Down
2 changes: 1 addition & 1 deletion tests/python/relay/test_ir_structural_equal_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_func_type_sequal():
ft = relay.FuncType(tvm.runtime.convert([t1, t2]), tp1,
tvm.runtime.convert([tp1, tp3]),
tvm.runtime.convert([tr1]))
translate_vars = relay.FuncType(tvm.runtime.convert([t1, t2]), tp1,
translate_vars = relay.FuncType(tvm.runtime.convert([t1, t2]), tp2,
tvm.runtime.convert([tp2, tp4]),
tvm.runtime.convert([tr2]))
assert ft == translate_vars
Expand Down

0 comments on commit 5762186

Please sign in to comment.