Comments (4)
That symbol is in libtvm.so
(using readelf --syms
).
So it either can't find that lib, or it hasn't properly linked to it - as this is what happened in #149 for libc10.so
and other libraries.
Has your target_link_libraries
line inCMakeLists.txt
got tvm
in it? (See my suggested patch in #149)
from tvm.
My pytorch did not have libtorch_cpu.so
or libtorch_cuda.so
(not sure why), so below is the patch I used:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6108e6..b656518 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ add_subdirectory(${TVM_DIR})
pybind11_add_module(_torch_tvm SHARED ${TORCH_TVM_SRCS})
target_link_libraries(_torch_tvm PUBLIC
- torch pybind11 tvm tvm_topi)
+ torch c10 torch_python pybind11 tvm tvm_topi)
target_include_directories(_torch_tvm PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
This fix was included in my first request (I forgot to mention it) and it did not fix the problem. The following commands have the following outputs:
$ readelf -Ws build/tvm/libtvm.so | grep _ZTIN3tvm4NodeE
7483: 00000000045e81d8 40 OBJECT WEAK DEFAULT 21 _ZTIN3tvm4NodeE
49707: 00000000045e81d8 40 OBJECT WEAK DEFAULT 21 _ZTIN3tvm4NodeE
$ readelf -Ws build/_torch_tvm.cpython-35m-x86_64-linux-gnu.so | grep _ZTIN3tvm4NodeE
315: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND _ZTIN3tvm4NodeE
from tvm.
To double-check the linking is working you can try:
$ objdump -p _torch_tvm.cpython-36m-x86_64-linux-gnu.so | grep NEEDED
NEEDED libc10.so
NEEDED libtorch_cpu.so
NEEDED libtorch_python.so
NEEDED libtvm.so
NEEDED libLLVM-6.0.so.1
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libc.so.6
NEEDED ld-linux-x86-64.so.2
And you should see a similar list including libtvm.so
.
If this is the case then for some reason the pytests can't find the library. I am using a python 3.6 virtual environment when building (though I did have some success with an anaconda environment, though haven't tried it recently).
Using strace python setup.py test
the log output shows it found libtvm.so
in the python environment here: py3.6env-tvm/lib/python3.6/site-packages/tvm-0.6.dev0-py3.6-linux-x86_64.egg/tvm/libtvm.so
So maybe the python setup.py install
step hasn't worked?
from tvm.
This issue was caused because my installed tvm was v0.6.0 from master, but this repo requires that the included facebookexperimental version be installed. Uninstalling the upstream tvm and following the tvm install instructions on the included tvm solves this issue.
from tvm.
Related Issues (20)
- Can't Build the Project on MacOs HOT 5
- error when importing torch_tvm HOT 6
- Error when installing TVM on Raspberry (PyTorch 1.1) HOT 1
- Question on FuseSupportedOps pass HOT 2
- "setup.py install --cmake" errors for type_traits, hashtable_policy.h and unordered_map.h HOT 1
- convert demo needed HOT 1
- No significant change in iters/sec while comparing cpu vs gpu performance HOT 5
- is this repo really useful and working? HOT 1
- LLVM error when import torch_tvm after building pytorch and torch_tvm from source HOT 5
- Saving the compiled graph HOT 1
- 3D Convolution? HOT 1
- llvm version HOT 1
- RuntimeError: _Map_base::at
- import torch_tvm error HOT 5
- Problems about installing torch_tvm ? HOT 3
- Make build C++ ABI aware
- "malloc(): memory corruption" when running benchmark.py
- Has the project been deprecated? HOT 2
- Is There Any Speed Benchmark for Pytorch/tvm
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tvm.