-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The latency difference between bilinear gridsample and nearest is significant in the same onnx model #4246
Comments
I tested with the ONNX model fragment, and indeed, the performance of bilinear is worse, approximately 200ms. The performance of nearest is approximately 75ms. The tested model comes from the following code--"multi_scale_deformable_attn_pytorch" function |
Obviously, the algorithm complexity of nearest is less than that of bilinear. |
I know. But the gap is too large and this is abnormal |
Can you upload the two subgraph onnxs ? ( grid_sample with bilinear + grid_sample with nearest ) |
I don't know why my image uploads always fail. It could be that there are some issues with my internet connection. The model just likes the code, some rehsape, some gather. The value_spatial_shapes is [[116, 200], [58, 100], [29, 50], [15, 25]] |
@brnguyen2 do you think the latency diff is reasonable or is there a potential perf bug? |
Environment
TensorRT Version:8.6.2
NVIDIA GPU:Orin
NVIDIA Driver Version:
CUDA Version:12.2
CUDNN Version: 8904
Description
I have a onnx model. There are some gridsample operators in this model. I use /usr/src/tensorrt/bin/trtexec tool to build the model and test performance in Orin. The command like this:
Here is my problem:
https://github.com/onnx/onnx-tensorrt/blob/7583da4c62475e84b7be31f4b8fb0c101873d434/builtin_op_importers.cpp#L4386
### So why the latency in these two scenarios is significantly different?
And when I want to get the profiling of model with nsight-compute, an error occurs halfway through execution.
I download new version nsight-compute from next website like 2023.3.0 and 2024.3.2, some errors also occurr and it can't start profiling.
https://developer.nvidia.com/tools-downloads#?dn=nsight-compute-2024-3-2
The text was updated successfully, but these errors were encountered: