MCPcopy Index your code
hub / github.com/apache/tvm / func

Function func

tests/python/relax/test_utils.py:188–201  ·  view source on GitHub ↗
(n: R.Prim("int64"))

Source from the content-addressed store, hash-verified

186 def define_function():
187 @R.function
188 def func(n: R.Prim("int64")):
189 @R.function
190 def recursive_lambda(i_arg: R.Prim(value="i")) -> R.Prim("int64"):
191 i = T.int64()
192 if R.prim_value(i == 0):
193 output = R.prim_value(T.int64(0))
194 else:
195 remainder_relax = recursive_lambda(R.prim_value(i - 1))
196 remainder_tir = T.int64()
197 _ = R.match_cast(remainder_relax, R.Prim(value=remainder_tir))
198 output = R.prim_value(i + remainder_tir)
199 return output
200
201 return recursive_lambda(n)
202
203 return func
204

Callers 8

_test_scalar_addFunction · 0.70
_test_infer_symFunction · 0.70
test_implicit_opFunction · 0.70
check_remoteFunction · 0.50

Calls 1

recursive_lambdaFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…