Skip to content

Commit

Permalink
Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795
Browse files Browse the repository at this point in the history
…)" (apache#6658)

* Revert "[Relay] Keep fixed dim when unifying dynamic shape (apache#5795)"

This reverts commit 782190e.

* run infer type on test_sparse_dense_padded_alter_op() to fix CI

Co-authored-by: masa <masa@pop-os.localdomain>
  • Loading branch information
2 people authored and Tushar Dey committed Oct 15, 2020
1 parent 633701c commit e7949bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
10 changes: 0 additions & 10 deletions tests/python/relay/test_type_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,16 +387,6 @@ def test_let_polymorphism():
tvm.ir.assert_structural_equal(body.checked_type, relay.TupleType([int32, relay.TupleType([])]))


def test_if():
choice_t = relay.FuncType([], relay.scalar_type("bool"))
f = relay.Var("f", choice_t)
true_branch = relay.Var("True", relay.TensorType([Any(), 1], dtype="float32"))
false_branch = relay.Var("False", relay.TensorType([Any(), Any()], dtype="float32"))
top = relay.Function([f, true_branch, false_branch], relay.If(f(), true_branch, false_branch))
ft = infer_expr(top)
tvm.ir.assert_structural_equal(ft.ret_type, relay.TensorType([Any(), 1], dtype="float32"))


def test_type_arg_infer():
code = """
#[version = "0.0.5"]
Expand Down
3 changes: 2 additions & 1 deletion tests/python/topi/python/test_topi_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ def test_sparse_dense_padded_alter_op():
),
)
f = relay.Function([], mult)
f_ = relay.transform.AlterOpLayout()(tvm.IRModule.from_expr(f))
f = relay.transform.InferType()(tvm.IRModule.from_expr(f))
f_ = relay.transform.AlterOpLayout()(f)
assert f_["main"].body.op.name == "nn.internal.sparse_dense_padded"


Expand Down

0 comments on commit e7949bd

Please sign in to comment.