GithubHelp home page GithubHelp logo

training error about second.pytorch HOT 7 OPEN

traveller59 avatar traveller59 commented on July 21, 2024
training error

from second.pytorch.

Comments (7)

traveller59 avatar traveller59 commented on July 21, 2024

This looks like your protobuf version is old, use pip install -U protobuf to install a new version.

from second.pytorch.

zwyzwy avatar zwyzwy commented on July 21, 2024

I am installing the sparseconvnet and meet the problems below, I have already update the google package.

running build_ext
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning:

                           !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (g++ 4.8) 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 'sparseconvnet.SCN' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/sparseconvnet
creating build/temp.linux-x86_64-3.6/sparseconvnet/SCN
/usr/local/cuda/bin/nvcc -I/home/users/wenyong.zheng/.local/include -I/mnt/data-3/data/wenyong.zheng/vxlnet/second.pytorch/SparseConvNet/sparseconvnet/SCN/ -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c sparseconvnet/SCN/cuda.cu -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/cuda.o -std=c++11 -Xcompiler -fopenmp -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC'
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning).
In file included from sparseconvnet/SCN/cuda.cu:8:0:
/mnt/data-3/data/wenyong.zheng/vxlnet/second.pytorch/SparseConvNet/sparseconvnet/SCN/Metadata/Metadata.h:15:33: fatal error: google/dense_hash_map: No such file or directory
#include <google/dense_hash_map>
^
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

from second.pytorch.

traveller59 avatar traveller59 commented on July 21, 2024

In my experience, the pip version of pytorch 0.4.1 use gcc 4.9.2 and conda 0.4.1 version use gcc 5. you need to use corresponding gcc version to compile SparseConvNet.

from second.pytorch.

zwyzwy avatar zwyzwy commented on July 21, 2024

when I update the gcc version to 4.9, errors occurred as below:

gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/users/wenyong.zheng/.local/include -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/csrc -I/mnt/data-3/data/wenyong.zheng/vxlnet/second.pytorch/SparseConvNet/sparseconvnet/SCN/ -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/TH -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/usr/include/python3.6m -c sparseconvnet/SCN/sparseconvnet_cuda.cpp -o build/temp.linux-x86_64-3.6/sparseconvnet/SCN/sparseconvnet_cuda.o -std=c++11 -fopenmp -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0
sparseconvnet/SCN/sparseconvnet_cuda.cpp:14:29: fatal error: torch/extension.h: No such file or directory
#include <torch/extension.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1

it can't find extension.h on my computer, though I locate such file, nothing returns.

from second.pytorch.

traveller59 avatar traveller59 commented on July 21, 2024

I don't know how to solve this error... I think you can consider to switch to Anaconda environment (don't need root)
Is torch/extension.h in the -I/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include gcc argument?

from second.pytorch.

zwyzwy avatar zwyzwy commented on July 21, 2024

after I fix such error, it seems another error occurred:

In file included from sparseconvnet/SCN/sparseconvnet_cpu.cpp:14:0:
sparseconvnet/SCN/Metadata/Metadata.cpp: In member function 'std::vectorat::Tensor Metadata::compareSparseHelper(Metadata&, at::Tensor)':
sparseconvnet/SCN/Metadata/Metadata.cpp:591:66: error: no matching function for call to 'at::TypeExtendedInterface::tensor()'
at::Tensor cL_ = torch::CPU(at::kLong).tensor({(long)cL.size()});
^
In file included from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:6:0,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:6,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5,
from sparseconvnet/SCN/sparseconvnet_cpu.cpp:12:
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::Storage, int64_t, at::IntList, at::IntList) const
virtual Tensor tensor(Storage storage, int64_t storageOffset, IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate expects 4 arguments, 1 provided
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::IntList, at::IntList) const
virtual Tensor tensor(IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate expects 2 arguments, 1 provided
In file included from sparseconvnet/SCN/sparseconvnet_cpu.cpp:14:0:
sparseconvnet/SCN/Metadata/Metadata.cpp:593:66: error: no matching function for call to 'at::TypeExtendedInterface::tensor()'
at::Tensor cR_ = torch::CPU(at::kLong).tensor({(long)cR.size()});
^
In file included from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:6:0,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:6,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5,
from sparseconvnet/SCN/sparseconvnet_cpu.cpp:12:
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::Storage, int64_t, at::IntList, at::IntList) const
virtual Tensor tensor(Storage storage, int64_t storageOffset, IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate expects 4 arguments, 1 provided
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::IntList, at::IntList) const
virtual Tensor tensor(IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate expects 2 arguments, 1 provided
In file included from sparseconvnet/SCN/sparseconvnet_cpu.cpp:14:0:
sparseconvnet/SCN/Metadata/Metadata.cpp:595:64: error: no matching function for call to 'at::TypeExtendedInterface::tensor()'
at::Tensor L_ = torch::CPU(at::kLong).tensor({(long)L.size()});
^
In file included from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:6:0,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:6,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5,
from sparseconvnet/SCN/sparseconvnet_cpu.cpp:12:
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::Storage, int64_t, at::IntList, at::IntList) const
virtual Tensor tensor(Storage storage, int64_t storageOffset, IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate expects 4 arguments, 1 provided
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::IntList, at::IntList) const
virtual Tensor tensor(IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate expects 2 arguments, 1 provided
In file included from sparseconvnet/SCN/sparseconvnet_cpu.cpp:14:0:
sparseconvnet/SCN/Metadata/Metadata.cpp:597:64: error: no matching function for call to 'at::TypeExtendedInterface::tensor()'
at::Tensor R_ = torch::CPU(at::kLong).tensor({(long)R.size()});
^
In file included from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/Context.h:6:0,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/ATen.h:6,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/csrc/utils/pybind.h:5,
from /home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/torch/extension.h:5,
from sparseconvnet/SCN/sparseconvnet_cpu.cpp:12:
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::Storage, int64_t, at::IntList, at::IntList) const
virtual Tensor tensor(Storage storage, int64_t storageOffset, IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:254:18: note: candidate expects 4 arguments, 1 provided
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate: virtual at::Tensor at::TypeExtendedInterface::tensor(at::IntList, at::IntList) const
virtual Tensor tensor(IntList size, IntList stride) const = 0;
^
/home/users/wenyong.zheng/.local/lib/python3.6/site-packages/torch/lib/include/ATen/TypeExtendedInterface.h:255:18: note: candidate expects 2 arguments, 1 provided
error: command 'gcc' failed with exit status 1

from second.pytorch.

lucasjinreal avatar lucasjinreal commented on July 21, 2024

@zwyzwy I also got this error, it's caused by SparseNet no longer support pytorch 0.41-, it upgrade into pytorch 1.0, you should probably using pytorch 1.0 to support SparseNet, I don't know whether newest version of pytorch compatiable with this repo though

from second.pytorch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.