MCPcopy Create free account
hub / github.com/apache/tvm / test_global_var_sinfo

Function test_global_var_sinfo

tests/python/relax/test_tvmscript_parser.py:1884–1898  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1882
1883
1884def test_global_var_sinfo():
1885 @I.ir_module(s_tir=True)
1886 class Module:
1887 @R.function
1888 def foo(x: R.Tensor((128, 128), "float32")):
1889 gv0 = R.emit_te(topi.add, x, x)
1890 return gv0
1891
1892 target_sinfo = R.Callable(
1893 (R.Tensor((128, 128), dtype="float32"),), R.Tensor((128, 128), dtype="float32")
1894 )
1895 gv = Module.get_global_var("foo")
1896 tvm.ir.assert_structural_equal(gv.struct_info, target_sinfo)
1897 tvm.ir.assert_structural_equal(Module["foo"].struct_info, target_sinfo)
1898 _check(Module)
1899
1900
1901def test_assert_op():

Callers

nothing calls this directly

Calls 3

TensorMethod · 0.80
get_global_varMethod · 0.80
_checkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…