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

Function while_loop

tests/python/tvmscript/test_tvmscript_roundtrip.py:2061–2075  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2059
2060
2061def while_loop():
2062 @T.prim_func(s_tir=True)
2063 def while_loop(a: T.handle, b: T.handle) -> None:
2064 A = T.match_buffer(a, (16,), "float32")
2065 B = T.match_buffer(b, (16,), "float32")
2066 i = T.sblock_alloc_buffer((), "int32", scope="local")
2067 for ii in range(16):
2068 with T.sblock():
2069 vi = T.axis.S(16, ii)
2070 B[vi] = 0
2071 while i[()] < 10:
2072 for j in range(16):
2073 B[j] += A[j]
2074
2075 return while_loop
2076
2077
2078# fmt: off

Callers 4

while_loopMethod · 0.85
mainMethod · 0.85
while_loopMethod · 0.85
mainMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…