Stratified-Transformer
Stratified-Transformer copied to clipboard
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 - Colab
Hello!
i'm trying to test this amazing architecture on google colab and I've only used the commands on the github guide. I post them to be clear
!git clone https://github.com/dvlab-research/Stratified-Transformer.git !pip install -r /content/Stratified-Transformer/requirements.txt !python3 /content/Stratified-Transformer/lib/pointops2/setup.py install
The third returns the error in the title but it is raised by the following: "x86_64-linux-gnu-gcc: error: src/pointops_api.cpp: No such file or directory"
To be clear at most I write all the output of the line 3:
running install running bdist_egg running egg_info writing pointops2.egg-info/PKG-INFO writing dependency_links to pointops2.egg-info/dependency_links.txt writing top-level names to pointops2.egg-info/top_level.txt /usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend. warnings.warn(msg.format('we could not find ninja.')) reading manifest file 'pointops2.egg-info/SOURCES.txt' writing manifest file 'pointops2.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext /usr/local/lib/python3.7/dist-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) building 'pointops2_cuda' extension x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.7/dist-packages/torch/include -I/usr/local/lib/python3.7/dist-packages/torch/include/torch/csrc/api/include -I/usr/local/lib/python3.7/dist-packages/torch/include/TH -I/usr/local/lib/python3.7/dist-packages/torch/include/THC -I/usr/local/cuda/include -I/usr/include/python3.7m -c src/pointops_api.cpp -o build/temp.linux-x86_64-3.7/src/pointops_api.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1013" -DTORCH_EXTENSION_NAME=pointops2_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 x86_64-linux-gnu-gcc: error: src/pointops_api.cpp: No such file or directory x86_64-linux-gnu-gcc: fatal error: no input files compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
How can I solve?
The pointops_api.cpp
is in the src/
directory. Can you try this: cd /content/Stratified-Transformer/lib/pointops2/ && python setup.py install
?
Thank you! It solves a bit but still it can't finish compiling because yelds another error
You environment may lack THC.h. I haven't met that before, so you can search which package contain it and install it.
@francescoromito In all .cpp files within lib\
comment out #include <THC/THC.h>
. Apparently, this is an old file thats not included with PyTorch anymore and its not needed.