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

Function test_tensorrt_conv2d_transpose

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

Source from the content-addressed store, hash-verified

228
229
230def test_tensorrt_conv2d_transpose():
231 # Default IOHW kernel layout ([in, out, h, w]); output channels are weight_shape[1].
232 @tvm.script.ir_module
233 class ConvTranspose:
234 @R.function
235 def main(
236 data: R.Tensor((2, 8, 16, 16), "float32"), weight: R.Tensor((8, 4, 3, 3), "float32")
237 ):
238 with R.dataflow():
239 out = relax.op.nn.conv2d_transpose(data, weight, padding=1)
240 R.output(out)
241 return out
242
243 data = np.random.randn(2, 8, 16, 16).astype("float32")
244 weight = np.random.randn(8, 4, 3, 3).astype("float32")
245 patterns = [
246 ("tensorrt.nn.conv2d_transpose", is_op("relax.nn.conv2d_transpose")(wildcard(), wildcard()))
247 ]
248 _offload_and_compare(ConvTranspose, {"weight": weight}, patterns, data)
249
250
251def test_tensorrt_conv3d_transpose():

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…