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

Method relu

tests/python/relax/test_transform_fuse_ops.py:915–921  ·  view source on GitHub ↗
(A: T.Buffer((T.int64(1), T.int64(512), T.int64(64), T.int64(64)), "float32"), B: T.Buffer((T.int64(1), T.int64(512), T.int64(64), T.int64(64)), "float32"))

Source from the content-addressed store, hash-verified

913
914 @T.prim_func(private=True, s_tir=True)
915 def relu(A: T.Buffer((T.int64(1), T.int64(512), T.int64(64), T.int64(64)), "float32"), B: T.Buffer((T.int64(1), T.int64(512), T.int64(64), T.int64(64)), "float32")):
916 for i0, i1, i2, i3 in T.grid(T.int64(1), T.int64(512), T.int64(64), T.int64(64)):
917 with T.sblock("relu"):
918 v_i0, v_i1, v_i2, v_i3 = T.axis.remap("SSSS", [i0, i1, i2, i3])
919 T.reads(A[v_i0, v_i1, v_i2, v_i3])
920 T.writes(B[v_i0, v_i1, v_i2, v_i3])
921 B[v_i0, v_i1, v_i2, v_i3] = T.max(A[v_i0, v_i1, v_i2, v_i3], T.float32(0))
922
923 @I.ir_module(s_tir=True)
924 class Expected:

Callers 15

_celuMethod · 0.45
_eluMethod · 0.45
reluFunction · 0.45
forwardMethod · 0.45
_impl_v13Method · 0.45
_impl_v1Method · 0.45
_impl_v1Method · 0.45
convert_reluMethod · 0.45
convert_eluMethod · 0.45
reluFunction · 0.45
conv2d_nhwc_bn_reluFunction · 0.45

Calls 2

remapMethod · 0.80
maxMethod · 0.80

Tested by

no test coverage detected