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

Function test_tensorrt_softmax

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

Source from the content-addressed store, hash-verified

183
184
185def test_tensorrt_softmax():
186 @tvm.script.ir_module
187 class Softmax:
188 @R.function
189 def main(data: R.Tensor((2, 8, 16, 16), "float32")):
190 with R.dataflow():
191 out = relax.op.nn.softmax(data, axis=1)
192 R.output(out)
193 return out
194
195 data = np.random.randn(2, 8, 16, 16).astype("float32")
196 patterns = [("tensorrt.nn.softmax", is_op("relax.nn.softmax")(wildcard()))]
197 _offload_and_compare(Softmax, {}, patterns, data)
198
199
200def test_tensorrt_sigmoid():

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…