jkun
1
When I ran the pytorch model, the terminal showed that:
One or more operators have not been tuned. Please tune your model for better performance. Use DEBUG logging level to see more details.
Relay top-1 id: 281, class name: tabby, tabby cat, class probality: 0.3626886010169983
Torch top-1 id: 281, class name: tabby, tabby cat, class probality: 0.36268892884254456
Relay time(ms): 41.741
Torch time(ms): 16.326
free(): invalid pointer
Aborted.
Why the relay time is twice than the torch time and how to avoid the free()?
masahi
2
As the message says, you need to tune for your workload to obtain reasonable performance.
invalid pointer
problem is due to symbol crash between PyTorch and TVM. There is an open issue for this problem. https://github.com/apache/tvm/issues/9362
For now, swapping the import order of tvm and torch should fix this problem.
jkun
3
It didn’t seem to work for me …
jkun
4
I see the github issues and tried many times, but it didn’t work. I wonder how to use the pdb and gdb to debug. Would you please give me some advice?
masahi
5
jkun
6
Thank you for your github issue, but it still didn’t work for me…
masahi
7
You need to replace /path/to/llvm-config
with the actual path to your llvm-config, for example /usr/bin/llvm-config
.
jkun
8
jkun
9
Thank you for your answer sincerely, but I wonder if the pictures below should be the proper settings.
vinx13
10
You need to modify USE_LLVM
and HIDE_PRIVATE_SYMBOLS
in build/config.cmake
jkun
11
Thank you very much, I have solved this problem successfully.