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

Function test_tensorrt_sigmoid

tests/python/relax/test_codegen_tensorrt.py:200–212  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

198
199
200def test_tensorrt_sigmoid():
201 @tvm.script.ir_module
202 class Sigmoid:
203 @R.function
204 def main(data: R.Tensor((2, 8, 16, 16), "float32")):
205 with R.dataflow():
206 out = relax.op.sigmoid(data)
207 R.output(out)
208 return out
209
210 data = np.random.randn(2, 8, 16, 16).astype("float32")
211 patterns = [("tensorrt.sigmoid", is_op("relax.sigmoid")(wildcard()))]
212 _offload_and_compare(Sigmoid, {}, patterns, data)
213
214
215def test_tensorrt_tanh():

Callers

nothing calls this directly

Calls 4

is_opFunction · 0.90
wildcardFunction · 0.90
_offload_and_compareFunction · 0.85
astypeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…