def test_type_relation():
    func = tvm.ir.EnvFunc.get("tvm.relay.type_relation.Broadcast")
    attrs = tvm.ir.make_node("attrs.TestAttrs", name="attr", padding=(3, 4))
    tp = TypeVar("tp")
    tf = FuncType([], TupleType([]), [], [])
    tt = TensorType([1, 2, 3], "float32")
    tr = TypeRelation(func, [tp, tf, tt], 2, attrs)

    check_visit(tr)
Beispiel #2
0
def test_type_relation():
    func = tvm.get_env_func('tvm.relay.type_relation.Broadcast')
    attrs = tvm.make.node('attrs.TestAttrs', name='attr', padding=(3,4))
    tp = TypeVar('tp')
    tf = FuncType([], TupleType([]), [], [])
    tt = TensorType([1, 2, 3], 'float32')
    tr = TypeRelation(func, [tp, tf, tt], 2, attrs)

    check_visit(tr)
def test_type_call():
    tc = TypeCall(GlobalTypeVar("tf"), [TupleType([])])
    check_visit(tc)
def test_ref_type():
    rt = RefType(TupleType([]))
    check_visit(rt)
def test_tuple_type():
    tt = TupleType([TupleType([])])
    check_visit(tt)