HazyResearch / butterfly

Butterfly matrix multiplication in PyTorch
Apache License 2.0
164 stars 31 forks source link

RuntimeError: Error compiling objects for extension #20

Open Mandy-77 opened 3 years ago

Mandy-77 commented 3 years ago

Hi, thanks for your excellent work. I met some problems when running python setup.py install:

running install
running bdist_egg
running egg_info
writing torch_butterfly.egg-info/PKG-INFO
writing dependency_links to torch_butterfly.egg-info/dependency_links.txt
writing top-level names to torch_butterfly.egg-info/top_level.txt
reading manifest file 'torch_butterfly.egg-info/SOURCES.txt'
writing manifest file 'torch_butterfly.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'torch_butterfly._butterfly' extension
Emitting ninja build file /mnt/nfsdisk/jier/butterfly_ori/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
g++ -pthread -shared -B /home/mandy/miniconda3/envs/fast/compiler_compat -L/home/mandy/miniconda3/envs/fast/lib -Wl,-rpath=/home/mandy/miniconda3/envs/fast/lib -Wl,--no-as-needed -Wl,--sysroot=/ /mnt/nfsdisk/jier/butterfly_ori/build/temp.linux-x86_64-3.7/mnt/nfsdisk/jier/butterfly_ori/csrc/butterfly.o /mnt/nfsdisk/jier/butterfly_ori/build/temp.linux-x86_64-3.7/mnt/nfsdisk/jier/butterfly_ori/csrc/cpu/butterfly_cpu.o /mnt/nfsdisk/jier/butterfly_ori/build/temp.linux-x86_64-3.7/mnt/nfsdisk/jier/butterfly_ori/csrc/cuda/butterfly_cuda.o -L/home/mandy/miniconda3/envs/fast/lib/python3.7/site-packages/torch/lib -L/usr/local/cuda-10.2/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.7/torch_butterfly/_butterfly.so
g++: error: /mnt/nfsdisk/jier/butterfly_ori/build/temp.linux-x86_64-3.7/mnt/nfsdisk/jier/butterfly_ori/csrc/cuda/butterfly_cuda.o: No such file or directory
error: command 'g++' failed with exit status 1

I use : python 3.7 pytorch 1.8.0 CUDA 10.2 Do you have any ideas how to solve this problem? Thank you.

tridao commented 3 years ago

Hi, thanks for trying our code. Which OS and gcc version are you using?

Mandy-77 commented 3 years ago

gcc version 7.4.0 Linux 5.0.0-23-generic x86_64

tridao commented 3 years ago

Does the machine you compile on have a GPU? Does it have access to the CUDA compiler (nvcc)? Or are you just using the CPU version?

Mandy-77 commented 3 years ago

Yes, it has the CUDA compiler, when I type nvcc --version I get Cuda compilation tools, release 10.2, V10.2.89.

tridao commented 3 years ago

Thanks, let me try to reproduce on my end.

Mandy-77 commented 3 years ago

Thanks a lot for your help!