Giter Site home page Giter Site logo

dgsparse / dgsparse-lib Goto Github PK

View Code? Open in Web Editor NEW
95.0 2.0 27.0 8.4 MB

PyTorch-Based Fast and Efficient Processing for Various Machine Learning Applications with Diverse Sparsity

Home Page: https://dgsparse.github.io/

License: MIT License

C 1.36% Cuda 68.41% C++ 13.83% Makefile 0.73% Python 13.78% Dockerfile 0.25% Shell 1.64%
gnn sparse-matrix spconv

dgsparse-lib's Issues

src/ge-spmm make failure

Steps to reproduce

git clone https://github.com/dgSPARSE/dgSPARSE-Library.git
cd dgSPARSE-Library/src/ge-spmm
make

Errors:

# output of 'make'
...
cp gespmm_v2.cu.o csrspmm_parreduce.cu.o gespmm_csrcoo_v2.cu.o csrspmm_rowcaching.cu.o csrspmm_seqreduce.cu.o csrspmm_non_transpose.cu.o gespmm.cc gespmm_v2.cu csrspmm_parreduce.cu gespmm_csrcoo_v2.cu csrspmm_rowcaching.cu csrspmm_seqreduce.cu csrspmm_non_transpose.cu gespmm.cc.o ../../objs
cp: target '../../objs' is not a directory
make: *** [Makefile:29: libgespmm.a] Error 1

example/ge-spmm

When running example ./spmm.out ../data/p2p-Gnutella31.mtx X
if X is not a 2^n integer
it reports like Wrong result: i = 363, j = 0, result = 0.000000, reference = 0.070000.

Only when X is a 2^n integer we can view the result correctly

[ERROR] Compile error with cuda_version(noexecpt torch custom op)

Command Line

python setup.py install

Env

Ubuntu-18.04
gcc-9.4.0
cuda-11.8
python-3.8.10
pytorch-2.1.0

Error info

/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/utils/cpp_extension.py:399: UserWarning: There are no x86_64-linux-gnu-g++ version bounds defined for CUDA version 11.8
  warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'dgsparse._version_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 -DWITH_PYTHON -DWITH_CUDA -Isrc -I/home/lzy/intel/oneapi/mkl -I/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include -I/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/TH -I/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/THC -I/home/lzy/BASE/cuda_118/include -I/home/lzy/dgsparse/env/include -I/usr/include/python3.8 -c src/version.cpp -o build/temp.linux-x86_64-3.8/src/version.o -O2 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_version_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
src/version.cpp:19:73: error: no matching function for call to ‘c10::RegisterOperators::op(const char [23], int64_t (*)() noexcept)’
   19 |    torch::RegisterOperators().op("dgsparse::cuda_version", &cuda_version);
      |                                                                         ^
In file included from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/library.h:67,
                 from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:13,
                 from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/script.h:3,
                 from src/version.cpp:4:
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:455:23: note: candidate: ‘c10::RegisterOperators&& c10::RegisterOperators::op(c10::RegisterOperators::Options&&) &&’
  455 |   RegisterOperators&& op(Options&& options) && {
      |                       ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:455:23: note:   candidate expects 1 argument, 2 provided
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:461:22: note: candidate: ‘c10::RegisterOperators& c10::RegisterOperators::op(c10::RegisterOperators::Options&&) &’
  461 |   RegisterOperators& op(Options&& options) & {
      |                      ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:461:22: note:   candidate expects 1 argument, 2 provided
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:471:23: note: candidate: ‘c10::RegisterOperators&& c10::RegisterOperators::op(const string&, c10::RegisterOperators::Options&&) &&’
  471 |   RegisterOperators&& op(const std::string& schemaOrName, Options&& options = RegisterOperators::options()) && {
      |                       ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:471:69: note:   no known conversion for argument 2 from ‘int64_t (*)() noexcept’ {aka ‘long int (*)() noexcept’} to ‘c10::RegisterOperators::Options&&’
  471 |   RegisterOperators&& op(const std::string& schemaOrName, Options&& options = RegisterOperators::options()) && {
      |                                                           ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:476:23: note: candidate: ‘c10::RegisterOperators&& c10::RegisterOperators::op(c10::FunctionSchema, c10::RegisterOperators::Options&&) &&’
  476 |   RegisterOperators&& op(FunctionSchema schema, Options&& options) && {
      |                       ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:476:41: note:   no known conversion for argument 1 from ‘const char [23]’ to ‘c10::FunctionSchema’
  476 |   RegisterOperators&& op(FunctionSchema schema, Options&& options) && {
      |                          ~~~~~~~~~~~~~~~^~~~~~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:522:4: note: candidate: ‘template<class FuncType> std::enable_if_t<(c10::guts::is_function_type<T>::value && (! std::is_same<FuncType, void(const c10::OperatorHandle&, std::vector<c10::IValue>*)>::value)), c10::RegisterOperators&&> c10::RegisterOperators::op(const string&, FuncType*, c10::RegisterOperators::Options&&) &&’
  522 |    op(const std::string& schemaOrName, FuncType* func, Options&& options = RegisterOperators::options()) && {
      |    ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:522:4: note:   template argument deduction/substitution failed:
In file included from /usr/include/c++/9/bits/move.h:55,
                 from /usr/include/c++/9/bits/stl_pair.h:59,
                 from /usr/include/c++/9/bits/stl_algobase.h:64,
                 from /usr/include/c++/9/bits/specfun.h:45,
                 from /usr/include/c++/9/cmath:1927,
                 from /usr/include/c++/9/math.h:36,
                 from /usr/include/python3.8/pyport.h:212,
                 from /usr/include/python3.8/Python.h:63,
                 from src/version.cpp:2:
/usr/include/c++/9/type_traits: In substitution of ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type [with bool _Cond = (((bool)std::integral_constant<bool, false>::value) && (!(bool)std::integral_constant<bool, false>::value)); _Tp = c10::RegisterOperators&&]’:
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:522:4:   required by substitution of ‘template<class FuncType> std::enable_if_t<(c10::guts::is_function_type<T>::value && (! std::is_same<FuncType, void(const c10::OperatorHandle&, std::vector<c10::IValue>*)>::value)), c10::RegisterOperators&&> c10::RegisterOperators::op(const string&, FuncType*, c10::RegisterOperators::Options&&) && [with FuncType = long int() noexcept]’
src/version.cpp:19:73:   required from here
/usr/include/c++/9/type_traits:2378:11: error: no type named ‘type’ in ‘struct std::enable_if<false, c10::RegisterOperators&&>’
 2378 |     using enable_if_t = typename enable_if<_Cond, _Tp>::type;
      |           ^~~~~~~~~~~
In file included from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/library.h:67,
                 from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/csrc/api/include/torch/types.h:13,
                 from /home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/torch/script.h:3,
                 from src/version.cpp:4:
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:551:5: note: candidate: ‘template<class Lambda> std::enable_if_t<(c10::guts::is_functor<LambdaType>::value && c10::guts::detail::is_stateless_lambda_<typename std::decay<typename std::decay<_Tp>::type>::type, void>::value), c10::RegisterOperators&&> c10::RegisterOperators::op(const string&, Lambda&&, c10::RegisterOperators::Options&&) &&’
  551 |     op(const std::string& schemaOrName, Lambda&& lambda, Options&& options = RegisterOperators::options()) && {
      |     ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:551:5: note:   template argument deduction/substitution failed:
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:568:5: note: candidate: ‘template<class Lambda> std::enable_if_t<(c10::guts::is_functor<LambdaType>::value && (! c10::guts::detail::is_stateless_lambda_<typename std::decay<typename std::decay<_Tp>::type>::type, void>::value)), c10::RegisterOperators&&> c10::RegisterOperators::op(const string&, Lambda&&, c10::RegisterOperators::Options&&) &&’
  568 |     op(const std::string& schemaOrName, Lambda&& lambda, Options&& options = RegisterOperators::options()) && {
      |     ^~
/home/lzy/dgsparse/env/lib/python3.8/site-packages/torch/include/ATen/core/op_registration/op_registration.h:568:5: note:   template argument deduction/substitution failed:
src/version.cpp:18:13: warning: ‘registry’ defined but not used [-Wunused-variable]
   18 | static auto registry =
      |             ^~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

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.