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

Class Object

tests/python/tvmscript/test_tvmscript_parser_tir.py:216–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214
215def test_tir_macro_in_class():
216 class Object:
217 def __init__(self, x: T.Buffer):
218 self.local_x = T.sblock_alloc_buffer(x.shape, x.dtype)
219
220 @T.inline
221 def load(self, x: T.Buffer):
222 N, M = T.meta_var(self.local_x.shape)
223 for i, j in T.grid(N, M):
224 with T.sblock("update"):
225 vi, vj = T.axis.remap("SS", [i, j])
226 self.local_x[vi, vj] = x[vi, vj]
227
228 @T.prim_func(private=True, s_tir=True)
229 def func_w_macro(a: T.handle):

Callers 1

func_w_macroFunction · 0.70

Calls

no outgoing calls

Tested by 1

func_w_macroFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…