()
| 183 | |
| 184 | |
| 185 | def 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 | |
| 200 | def test_tensorrt_sigmoid(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…