Skip to content
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

cuda 10.0 trilinear build failed #2

Closed
zjlinkin opened this issue May 11, 2021 · 5 comments
Closed

cuda 10.0 trilinear build failed #2

zjlinkin opened this issue May 11, 2021 · 5 comments

Comments

@zjlinkin
Copy link

after run sh setup.sh successfully, I run 'import trilinear' and then arise the following error:

import trilinear
Traceback (most recent call last):
File "", line 1, in
ImportError: /usr/local/python3.6.5/lib/python3.6/site-packages/trilinear-0.0.0-py3.6-linux-x86_64.egg/trilinear.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN6caffe26detail36_typeMetaDataInstance_preallocated_4E

my environment as below:
ubuntu 16.04
python 3.6
pytorch 1.1
cuda 10.0

@csjliang
Copy link
Owner

Hi, when you run sh setup.sh, do you get the message that you have successfully installed the trilinear-0.0.0? Have you adapted the command in the setup.sh file to cuda 10.0? Thanks.

@zjlinkin
Copy link
Author

'run setup.sh' log info seems no problem, the whole log as below. I have revise the setup.sh as 'export CUDA_HOME=/usr/local/cuda-10.0 && python3 setup.py install'

sh setup.sh
Including CUDA code.
running install
running bdist_egg
running egg_info
creating trilinear.egg-info
writing trilinear.egg-info/PKG-INFO
writing dependency_links to trilinear.egg-info/dependency_links.txt
writing top-level names to trilinear.egg-info/top_level.txt
writing manifest file 'trilinear.egg-info/SOURCES.txt'
reading manifest file 'trilinear.egg-info/SOURCES.txt'
writing manifest file 'trilinear.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'trilinear' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/TH -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/usr/local/python3.6.5/include/python3.6m -c src/trilinear_cuda.cpp -o build/temp.linux-x86_64-3.6/src/trilinear_cuda.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=trilinear -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda-10.0/bin/nvcc -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/TH -I/usr/local/python3.6.5/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.0/include -I/usr/local/python3.6.5/include/python3.6m -c src/trilinear_kernel.cu -o build/temp.linux-x86_64-3.6/src/trilinear_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=trilinear -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
creating build/lib.linux-x86_64-3.6
g++ -pthread -shared build/temp.linux-x86_64-3.6/src/trilinear_cuda.o build/temp.linux-x86_64-3.6/src/trilinear_kernel.o -L/usr/local/cuda-10.0/lib64 -lcudart -o build/lib.linux-x86_64-3.6/trilinear.cpython-36m-x86_64-linux-gnu.so
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/trilinear.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
creating stub loader for trilinear.cpython-36m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/trilinear.py to trilinear.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying trilinear.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying trilinear.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying trilinear.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying trilinear.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
pycache.trilinear.cpython-36: module references file
creating dist
creating 'dist/trilinear-0.0.0-py3.6-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing trilinear-0.0.0-py3.6-linux-x86_64.egg
removing '/usr/local/python3.6.5/lib/python3.6/site-packages/trilinear-0.0.0-py3.6-linux-x86_64.egg' (and everything under it)
creating /usr/local/python3.6.5/lib/python3.6/site-packages/trilinear-0.0.0-py3.6-linux-x86_64.egg
Extracting trilinear-0.0.0-py3.6-linux-x86_64.egg to /usr/local/python3.6.5/lib/python3.6/site-packages
trilinear 0.0.0 is already the active version in easy-install.pth

Installed /usr/local/python3.6.5/lib/python3.6/site-packages/trilinear-0.0.0-py3.6-linux-x86_64.egg
Processing dependencies for trilinear==0.0.0
Finished processing dependencies for trilinear==0.0.0

@csjliang
Copy link
Owner

Actually, you need import torch first and then import trilinear to import some symbols provided by PyTorch.

@zjlinkin
Copy link
Author

Yes. it is my mistake, thanks your reply !
by the way, I notice that you are also the author of 'High-Resolution Photorealistic Image Translation in Real-Time: A Laplacian Pyramid Translation Network', it is promising for my research, i am looking forward to learning more detail through the code

@csjliang
Copy link
Owner

The codes of the LPTN paper will be released soon. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants