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

Function test_lone_private_function

tests/python/relax/test_tvmscript_printer_relax.py:56–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54
55
56def test_lone_private_function():
57 @R.function(private=True)
58 def func(a: R.Tensor((10, 10))) -> R.Tensor((10, 10)): # type: ignore
59 R.func_attr({"some_attr": 1})
60 return a
61
62 # name prints as main because without a global symbol, the printer cannot assume a name
63 _assert_print(
64 func,
65 """
66# from tvm.script import relax as R
67
68@R.function(private=True)
69def main(a: R.Tensor((10, 10))) -> R.Tensor((10, 10)):
70 R.func_attr({"some_attr": 1})
71 return a""",
72 )
73
74
75def test_extern_func():

Callers

nothing calls this directly

Calls 1

_assert_printFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…