Comments (27)
This is weird! Did you try removing the extra_compile_args
argument in setup.py L67? Which platform do you use?
from l3c-pytorch.
My platform is Linux.
I have tried to remove the extra_compile_args argument in setup.py L67. The error still exist.
(pytorch) [wency@localhost torchac]$ COMPILE_CUDA=no python setup.py
Compiling, cuda_support=False
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
from l3c-pytorch.
Does it work with COMPILE_CUDA=no python setup.py compile
. Maybe I made a mistake in the README.
from l3c-pytorch.
It seems that it doesn't work...
(pytorch) [wency@localhost torchac]$ COMPILE_CUDA=no python setup.py compile
Compiling, cuda_support=False
/home/wency/anaconda3/envs/pytorch/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'extra_compile_args'
warnings.warn(msg)
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'compile'
from l3c-pytorch.
Sorry, I meant COMPILE_CUDA=no python setup.py install
. does that work?
from l3c-pytorch.
(pytorch) [wency@localhost torchac]$ COMPILE_CUDA=no python setup.py install
Compiling, cuda_support=False
/home/wency/anaconda3/envs/pytorch/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'extra_compile_args'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating torchac_backend_cpu.egg-info
writing torchac_backend_cpu.egg-info/PKG-INFO
writing dependency_links to torchac_backend_cpu.egg-info/dependency_links.txt
writing top-level names to torchac_backend_cpu.egg-info/top_level.txt
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
reading manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
/home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/cpp_extension.py:191: UserWarning:
!! WARNING !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! WARNING !!
warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
building 'torchac_backend_cpu' extension
creating build
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/home
creating build/temp.linux-x86_64-3.7/home/wency
creating build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch
creating build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch/src
creating build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch/src/torchac
creating build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch/src/torchac/torchac_backend
gcc -pthread -B /home/wency/anaconda3/envs/pytorch/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/wency/anaconda3/envs/pytorch/include/python3.7m -c /home/wency/L3C-PyTorch/src/torchac/torchac_backend/torchac.cpp -o build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch/src/torchac/torchac_backend/torchac.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=torchac_backend_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option \u2018-Wstrict-prototypes\u2019 is valid for C/ObjC but not for C++ [enabled by default]
creating build/lib.linux-x86_64-3.7
g++ -pthread -shared -B /home/wency/anaconda3/envs/pytorch/compiler_compat -L/home/wency/anaconda3/envs/pytorch/lib -Wl,-rpath=/home/wency/anaconda3/envs/pytorch/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.7/home/wency/L3C-PyTorch/src/torchac/torchac_backend/torchac.o -o build/lib.linux-x86_64-3.7/torchac_backend_cpu.cpython-37m-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.7/torchac_backend_cpu.cpython-37m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
creating stub loader for torchac_backend_cpu.cpython-37m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/torchac_backend_cpu.py to torchac_backend_cpu.cpython-37.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.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.torchac_backend_cpu.cpython-37: module references file
creating dist
creating 'dist/torchac_backend_cpu-1.0.0-py3.7-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 torchac_backend_cpu-1.0.0-py3.7-linux-x86_64.egg
creating /home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torchac_backend_cpu-1.0.0-py3.7-linux-x86_64.egg
Extracting torchac_backend_cpu-1.0.0-py3.7-linux-x86_64.egg to /home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages
Adding torchac-backend-cpu 1.0.0 to easy-install.pth file
Installed /home/wency/anaconda3/envs/pytorch/lib/python3.7/site-packages/torchac_backend_cpu-1.0.0-py3.7-linux-x86_64.egg
Processing dependencies for torchac-backend-cpu==1.0.0
Finished processing dependencies for torchac-backend-cpu==1.0.0
With the command, it seems that I have install the torchac. While when I test with the following command, it turn out to be wrong...
(pytorch) [wency@localhost torchac]$ python -c 'import torchac'
*** ERROR: torchac_backend not found. Please see README.
It seems I am failed again.
from l3c-pytorch.
(Please use backticks for the future to make rading easer, see formatting.)
The problem now is likely
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 4.9 and above.
See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
for instructions on how to install GCC 4.9 or higher.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Do you have a newer GCC available on your system?
from l3c-pytorch.
If you have it somewhere, you can prepend to path. E.g. on my system I do
export PATH=~/compilers/gcc/gcc-5.5.0/bin:$PATH
export COMPILE_CUDA=auto
python setup.py install;
from l3c-pytorch.
Probably, the problem discussed in #4 is also relevant here. Can you try the solution posted there?
from l3c-pytorch.
I'm closing this now, re-open if there are still problems.
from l3c-pytorch.
Hi!@fab-jul I met the same problems! *** ERROR: torchac_backend not found. Please see README.
I tried the gcc-5 and it failed! And solution in #4 also does not work!
from l3c-pytorch.
Hi, which command did you try to compile and what is the exact error message?
from l3c-pytorch.
COMPILE_CUDA=auto python setup.py install
for cpu
and COMPILE_CUDA=force python setup.py install
for gpu
error:
when i run l3c.py, it has:
*** ERROR: torchac_backend not found. Please see README.
and when i import torchac_backend_cpu in python env, it has:
ImportError:xxxx.so, undefined symbol:_ZN2at19undefinedTensorImpl10_singletonE
from l3c-pytorch.
And what about the compile command? What‘s the output there?
from l3c-pytorch.
Also, which version of pytorch do you have?
from l3c-pytorch.
sorry for bothering u again! my pytorch is 1.0.1!
compile command is COMPILE_CUDA=auto python setup.py install
according to readme! and output is:
`COMPILE_CUDA=auto python setup.py install
Found CUDA supported: False
Compiling, cuda_support=False
/home/xxx/anaconda3/envs/py36/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'extra_compile_args'
warnings.warn(msg)
running install
running bdist_egg
running egg_info
creating torchac_backend_cpu.egg-info
writing torchac_backend_cpu.egg-info/PKG-INFO
writing dependency_links to torchac_backend_cpu.egg-info/dependency_links.txt
writing top-level names to torchac_backend_cpu.egg-info/top_level.txt
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
reading manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
writing manifest file 'torchac_backend_cpu.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'torchac_backend_cpu' extension
gcc -pthread -B /home/xxx/anaconda3/envs/py36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torch/lib/include -I/home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torch/lib/include/torch/csrc/api/include -I/home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torch/lib/include/TH -I/home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torch/lib/include/THC -I/home/xxx/anaconda3/envs/py36/include/python3.6m -c /home/xxx/Desktop/compression-master/L3C-PyTorch-master/src/torchac/torchac_backend/torchac.cpp -o build/temp.linux-x86_64-3.6/home/xxx/Desktop/compression-master/L3C-PyTorch-master/src/torchac/torchac_backend/torchac.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=torchac_backend_cpu -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++
g++ -pthread -shared -B /home/xxx/anaconda3/envs/py36/compiler_compat -L/home/xxx/anaconda3/envs/py36/lib -Wl,-rpath=/home/xxx/anaconda3/envs/py36/lib -Wl,--no-as-needed -Wl,--sysroot=/ build/temp.linux-x86_64-3.6/home/xxx/Desktop/compression-master/L3C-PyTorch-master/src/torchac/torchac_backend/torchac.o -o build/lib.linux-x86_64-3.6/torchac_backend_cpu.cpython-36m-x86_64-linux-gnu.so
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/torchac_backend_cpu.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.6/torchac_backend_gpu.cpython-36m-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
creating stub loader for torchac_backend_cpu.cpython-36m-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/torchac_backend_cpu.py to torchac_backend_cpu.cpython-36.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchac_backend_cpu.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.torchac_backend_cpu.cpython-36: module references file
creating 'dist/torchac_backend_cpu-1.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 torchac_backend_cpu-1.0.0-py3.6-linux-x86_64.egg
creating /home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torchac_backend_cpu-1.0.0-py3.6-linux-x86_64.egg
Extracting torchac_backend_cpu-1.0.0-py3.6-linux-x86_64.egg to /home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages
Adding torchac-backend-cpu 1.0.0 to easy-install.pth file
Installed /home/xxx/anaconda3/envs/py36/lib/python3.6/site-packages/torchac_backend_cpu-1.0.0-py3.6-linux-x86_64.egg
Processing dependencies for torchac-backend-cpu==1.0.0
Finished processing dependencies for torchac-backend-cpu==1.0.0
`
from l3c-pytorch.
So to me the previous error sounds like it could be related to your pytorch version. Could you try with 1.1? See README.
from l3c-pytorch.
Oh!, Maybe i found the reason, nvcc is 5.5 not 9.
from l3c-pytorch.
Could also be. You can also try with COMPILE_CUDA=no iirc
But using pytorch 1.1 is also important I think.
from l3c-pytorch.
Did you get it to run?
from l3c-pytorch.
:(
I use pytorch1.1 and it does not work. nvcc=9 is also not right.
But i do not know what is iirc
You can also try with COMPILE_CUDA=no iirc
from l3c-pytorch.
iirc == if I recall correctly
what I meant is you can try to compile with
COMPILE_CUDA=no python setup.py install
from l3c-pytorch.
What does pip list
show? And I think the compilation is actually fine, the problem seems to be the
ImportError:xxxx.so, undefined symbol:_ZN2at19undefinedTensorImpl10_singletonE
which sounds like there is some incorrect static library somewhere. not sure which or what. you could also try the fix used in the pull request #19.
from l3c-pytorch.
pip list
is normal. So i think compilation is also fine. And COMPILE_CUDA=no
can't help me.
All in all, i will try the solution in the pull request #19.
from l3c-pytorch.
Ok, keep me posted!
from l3c-pytorch.
Thanks God! I finally solve this problem with #https://github.com/caoscott/SReC/blob/master/INSTALL.md.
from l3c-pytorch.
FYI, I released this as a standalone library that does not need CUDA here: https://github.com/fab-jul/torchac
from l3c-pytorch.
Related Issues (20)
- AssertionError: Expected a base dir for every component, got ['0524_0001'] and ['configs/ms', 'configs/dl'] HOT 8
- The loss value remained around 5 HOT 4
- questions about the probability prediction part in the paper HOT 1
- Question about the computation of cdf in the code HOT 13
- torchac: how to find <EOM> to separate bytes strings (channels) ? HOT 1
- get errors when compress image HOT 2
- run train.py error HOT 7
- questions about AC code
- weird problem when encoding HOT 1
- Question about CDF function and AC code HOT 2
- CDF function and model p HOT 3
- Error while decompressing HOT 4
- AttributeError: module 'torchac.torchac' has no attribute 'CUDA_SUPPORTED' HOT 2
- Size of compressed file HOT 1
- Evaluation Sets
- How to modify this code to enable compression of 16Bit Images HOT 1
- Running time
- python .\setup.py install faill HOT 1
- Do not able to learn the latent representations
- question about header
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 l3c-pytorch.