()
| 249 | |
| 250 | |
| 251 | def test_tensorrt_conv3d_transpose(): |
| 252 | # Default IODHW kernel layout ([in, out, d, h, w]); output channels are weight_shape[1]. |
| 253 | @tvm.script.ir_module |
| 254 | class ConvTranspose3d: |
| 255 | @R.function |
| 256 | def main( |
| 257 | data: R.Tensor((2, 4, 8, 8, 8), "float32"), weight: R.Tensor((4, 2, 3, 3, 3), "float32") |
| 258 | ): |
| 259 | with R.dataflow(): |
| 260 | out = relax.op.nn.conv3d_transpose(data, weight, padding=1) |
| 261 | R.output(out) |
| 262 | return out |
| 263 | |
| 264 | data = np.random.randn(2, 4, 8, 8, 8).astype("float32") |
| 265 | weight = np.random.randn(4, 2, 3, 3, 3).astype("float32") |
| 266 | patterns = [ |
| 267 | ("tensorrt.nn.conv3d_transpose", is_op("relax.nn.conv3d_transpose")(wildcard(), wildcard())) |
| 268 | ] |
| 269 | _offload_and_compare(ConvTranspose3d, {"weight": weight}, patterns, data) |
| 270 | |
| 271 | |
| 272 | def test_tensorrt_int8_calibration(monkeypatch): |
nothing calls this directly
no test coverage detected
searching dependent graphs…