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

Function add_func

tests/python/tirx/test_buffer_print.py:201–210  ·  view source on GitHub ↗
(A_ptr: T.handle, B_ptr: T.handle, C_ptr: T.handle)

Source from the content-addressed store, hash-verified

199
200 @T.prim_func(s_tir=True)
201 def add_func(A_ptr: T.handle, B_ptr: T.handle, C_ptr: T.handle) -> None:
202 A = T.match_buffer(A_ptr, (M,), dtype_str)
203 B = T.match_buffer(B_ptr, (M,), dtype_str)
204 C = T.match_buffer(C_ptr, (M,), dtype_str)
205
206 for i in T.grid(M):
207 with T.sblock("C"):
208 vi = T.axis.spatial(M, i)
209 C[vi] = A[vi] + B[vi]
210 T.print_buffer(C.data, dtype_str, False, False, dim_num, (M,))
211
212 sch = tvm.s_tir.Schedule(add_func)
213 blk = sch.get_sblock("C")

Callers 2

test_executable_getitemFunction · 0.50

Calls 1

spatialMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…