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

Function recursive_lambda

tests/python/relax/test_utils.py:190–199  ·  view source on GitHub ↗
(i_arg: R.Prim(value="i"))

Source from the content-addressed store, hash-verified

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

Callers 3

funcFunction · 0.85
func_aFunction · 0.85
func_bFunction · 0.85

Calls 1

match_castMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…