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

Method zeros

tests/python/relax/test_transform.py:282–289  ·  view source on GitHub ↗
(A: T.Buffer((2, 3), "int32"))

Source from the content-addressed store, hash-verified

280 class Input:
281 @T.prim_func(s_tir=True)
282 def zeros(A: T.Buffer((2, 3), "int32")):
283 # just overwrites A with 0s
284 T.func_attr({"tirx.noalias": True})
285 for i0, i1 in T.grid(T.int64(2), T.int64(3)):
286 with T.sblock("T_zeros"):
287 ax0, ax1 = T.axis.remap("SS", [i0, i1])
288 T.writes(A[ax0, ax1])
289 A[ax0, ax1] = T.int32(0)
290
291 @R.function
292 def foo(x: R.Tensor((2, 3), "int32")) -> R.Tensor((2, 3), "int32"):

Callers 15

_convert_varMethod · 0.45
autopadFunction · 0.45
_instance_normMethod · 0.45
_layer_norm_implMethod · 0.45
_emptyMethod · 0.45
_batch_normMethod · 0.45
_lstmMethod · 0.45

Calls 1

remapMethod · 0.80

Tested by

no test coverage detected