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

Function test_tensorrt_conv3d_transpose

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

Source from the content-addressed store, hash-verified

249
250
251def 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
272def test_tensorrt_int8_calibration(monkeypatch):

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…