Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/relay/pass/alpha_eq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct TypeAlphaEq : TypeVisitor<const Type&> {

void VisitType_(const IncompleteTypeNode* bt1, const Type& t2) final {
if (const IncompleteTypeNode* bt2 = t2.as<IncompleteTypeNode>()) {
equal = equal && bt1 == bt2;
equal = equal && bt1->kind == bt2->kind;
return;
} else {
equal = false;
Expand Down
5 changes: 1 addition & 4 deletions tests/python/relay/test_pass_alpha_equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@ def test_incomplete_type_alpha_equal():
t2 = relay.IncompleteType(relay.Kind.Type)
t3 = relay.IncompleteType(relay.Kind.Type)

# only equal when there is pointer equality
assert t2 == t2
assert t1 == t1
assert t1 != t2
assert t2 != t3
assert t2 == t3


def test_type_param_alpha_equal():
Expand Down