You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I successfully used the VM to complete the inference of Mask R-CNN on the CUDA backend. However, when I tried to convert the Mask R-CNN in Torch format to ONNX format, I found that the VM seems unable to handle the dynamic shape issues introduced by the NonZero operator (it looks like it).
From the perspective of Relay IR analysis, after the NonZero operation, the model's output shape becomes: ?
which leads to a series of shape inference problems. For example, when choosing the implementation for subsequent convolution operations, it is unable to select the appropriate implementation for correct computation due to the dynamic input shape. eg: Cannot find config for target=cuda -keys=cuda,gpu -arch=sm_86 -libs=cublas -max_num_threads=1024 -thread_warp_size=32, workload=('conv2d_nchw.cuda', ('TENSOR', (any_dim, any_dim, any_dim, any_dim), 'float32'), ('TENSOR', (256, any_dim, 3, 3), 'float32'), (1, 1), (1, 1, 1, 1), (1, 1), 'float32'). A fallback configuration is used, which may bring great performance regression.
However, it seems that the PyTorch frontend does not have this issue.
I would like to hear your thoughts and suggestions on this problem. Looking forward to your reply~
The text was updated successfully, but these errors were encountered:
Hello, Masahi. I'm very glad to see this repo.
I successfully used the VM to complete the inference of Mask R-CNN on the CUDA backend. However, when I tried to convert the Mask R-CNN in Torch format to ONNX format, I found that the VM seems unable to handle the dynamic shape issues introduced by the NonZero operator (it looks like it).
From the perspective of Relay IR analysis, after the NonZero operation, the model's output shape becomes: ?
%418 = argwhere(%417) /* ty=Tensor[(?, 1), int32] span=/model/rpn/NonZero:0:0 */;
which leads to a series of shape inference problems. For example, when choosing the implementation for subsequent convolution operations, it is unable to select the appropriate implementation for correct computation due to the dynamic input shape. eg:
Cannot find config for target=cuda -keys=cuda,gpu -arch=sm_86 -libs=cublas -max_num_threads=1024 -thread_warp_size=32, workload=('conv2d_nchw.cuda', ('TENSOR', (any_dim, any_dim, any_dim, any_dim), 'float32'), ('TENSOR', (256, any_dim, 3, 3), 'float32'), (1, 1), (1, 1, 1, 1), (1, 1), 'float32'). A fallback configuration is used, which may bring great performance regression.
However, it seems that the PyTorch frontend does not have this issue.
I would like to hear your thoughts and suggestions on this problem. Looking forward to your reply~
The text was updated successfully, but these errors were encountered: