Hello. I am pushing a U-Net like model through TVM, after looking online at the impressive benchmarks on the TVM webpage.
I think I am experiencing something similar to [NNVM] conv2d_transpose is particularly slow, though I’m not sure. This is the network I create in pytorch and export to ONNX:
net = nn.Sequential(nn.ConvTranspose2d(in_channels=128, out_channels=128, kernel_size=2, stride=2),
nn.ReLU(),
nn.ConvTranspose2d(in_channels=128, out_channels=128, kernel_size=2, stride=2),
nn.ReLU(),
nn.ConvTranspose2d(in_channels=128, out_channels=64, kernel_size=2, stride=2))
Which takes 0.44
seconds in average to compute in pytorch.
When I want to optimize this model in TVM with
target = 'llvm -mcpu=core-avx2'
onnx_model = onnx.load('nodilation.onnx')
input_name = 'input'
input_shape = (1, 128, 128, 128)
shape_dict = {input_name: input_shape}
net, params = relay.frontend.from_onnx(onnx_model, shape_dict)
tasks = autotvm.task.extract_from_program(net, target=target,
params=params, ops=(relay.op.nn.conv2d, relay.op.nn.conv2d_transpose))
I see that tasks[0].workload is None
and I am not able to optimize the up-convolutions, which results in a very very slow model (50
seconds per call).
I am new to TVM, so my questions are:
- Am I doing something wrong, and if so how can I fix it?
- If it has to do with TVM’s support for transposed convs, are you planning to support this soon? How can I help?
Thanks!
Carlos