You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "echuraev (via GitHub)" <gi...@apache.org> on 2023/07/25 14:22:06 UTC
[GitHub] [tvm] echuraev opened a new issue, #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
echuraev opened a new issue, #15405:
URL: https://github.com/apache/tvm/issues/15405
`non_max_suppression` works much faster on GraphExecutor in comparison with VirtualMachine.
### Expected behavior
I suppose that the performance should be the same for VM and GE.
### Actual behavior
On my CPU (Intel Core i7-7700K) `non_max_suppression` works 3 times slower on VM (1066.29 ms) vs GE (359.79 ms).
Tried to analyze this problem by using VTune Amplifier. And saw that about 70% of the execution time some work was done in `lib.so` (the name of the compiled model).

In GE we don't have such overhead.
### Environment
Linux OS, latest mainline.
### Steps to reproduce
You can use the following script to reproduce this problem. I changed its extension to `.txt` because `.py` file cannot be uploaded to GitHub.
[reproducer.txt](https://github.com/apache/tvm/files/12162179/reproducer.txt)
On the top of the source code, you can change the value of variable `USE_VM` to specify if the layer should be inferred on VM or on GE.
### Triage
Please refer to the list of label tags [here](https://github.com/apache/tvm/wiki/Issue-Triage-Labels) to find the relevant tags and add them below in a bullet format (example below).
* flow:vm
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] twmht commented on issue #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
Posted by "twmht (via GitHub)" <gi...@apache.org>.
twmht commented on issue #15405:
URL: https://github.com/apache/tvm/issues/15405#issuecomment-1653293247
@echuraev
you can use gist to show the code.
btw, how you analyze the code?
> And saw that about 70% of the execution time some work was done in lib.so (the name of the compiled model).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] echuraev commented on issue #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
Posted by "echuraev (via GitHub)" <gi...@apache.org>.
echuraev commented on issue #15405:
URL: https://github.com/apache/tvm/issues/15405#issuecomment-1653338487
@twmht I created [the gist](https://gist.github.com/echuraev/19d5d03ef4eeb066b26004219c49dec2) with the reproducer.
I built TVM with debug symbols and I used Intel VTune Amplifier to analyze the hotspots in the TVM.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] twmht commented on issue #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
Posted by "twmht (via GitHub)" <gi...@apache.org>.
twmht commented on issue #15405:
URL: https://github.com/apache/tvm/issues/15405#issuecomment-1654932243
@echuraev
I have reproduced the problem. btw, because i never used NMS from TVM, what is the advantage to use nms in TVM? because I thought the benifit of TVM is auto turing, we can auto tune NMS but it's dynamic shape in runtinme, not very suit for auto tuning. do you have any idea?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] echuraev commented on issue #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
Posted by "echuraev (via GitHub)" <gi...@apache.org>.
echuraev commented on issue #15405:
URL: https://github.com/apache/tvm/issues/15405#issuecomment-1655045236
Nice to hear that @twmht! NMS is used in some topologies. For example, I found this problem after analyzing [ssd resnet](https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/ssd) model from ONNX model zoo. NMS is used in this topology. Also, I saw this layer in [onnx-yolov3](https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/yolov3) and [onnx-faster-rcnn](https://github.com/onnx/models/tree/main/vision/object_detection_segmentation/faster-rcnn).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug][VM] Performance degradation of non_max_suppression layer on VM [tvm]
Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed issue #15405: [Bug][VM] Performance degradation of non_max_suppression layer on VM
URL: https://github.com/apache/tvm/issues/15405
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org