Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build from source fails #79

Open
goswamig opened this issue Jul 25, 2023 · 2 comments
Open

Build from source fails #79

goswamig opened this issue Jul 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@goswamig
Copy link

Describe the bug:
$ cmake --build build
[ 12%] Building CXX object src/cc/torchdistx/CMakeFiles/torchdistx.dir/deferred_init.cc.o
In file included from /usr/include/c++/11/memory:76,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/C++17.h:8,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/string_view.h:4,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/StringUtil.h:6,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/util/Exception.h:5,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/core/DispatchKeySet.h:3,
from /home/ubuntu/.local/lib/python3.8/site-packages/torch/include/c10/core/impl/LocalDispatchKeySet.h:3,
from /home/ubuntu/torchdistx/src/cc/torchdistx/deferred_init.h:10,
from /home/ubuntu/torchdistx/src/cc/torchdistx/deferred_init.cc:7:
/usr/include/c++/11/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = torchdistx::detail::{anonymous}::ProxyVariableHooks; _Args = {at::impl::VariableHooksInterface*&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrtorchdistx::detail::{anonymous}::ProxyVariableHooks]’:
/home/ubuntu/torchdistx/src/cc/torchdistx/deferred_init.cc:1098:50: required from here
/usr/include/c++/11/bits/unique_ptr.h:962:30: error: invalid new-expression of abstract class type ‘torchdistx::detail::{anonymous}::ProxyVariableHooks’
962 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/torchdistx/src/cc/torchdistx/deferred_init.cc:956:7: note: because the following virtual functions are pure within ‘torchdistx::detail::{anonymous}::ProxyVariableHooks’:
956 | class ProxyVariableHooks : public VariableHooksInterface {
| ^~~~~~~~~~~~~~~~~~
In file included from /home/ubuntu/torchdistx/src/cc/torchdistx/deferred_init.cc:21:
/home/ubuntu/.local/lib/python3.8/site-packages/torch/include/ATen/core/VariableHooksInterface.h:62:16: note: ‘virtual void at::impl::VariableHooksInterface::basic_autograd_not_implemented_fallback(const c10::OperatorHandle&, c10::DispatchKeySet, torch::jit::Stack*) const’
62 | virtual void basic_autograd_not_implemented_fallback(const c10::OperatorHandle& op, c10::DispatchKeySet dispatch_keys, torch::jit::Stack* stack) const = 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [src/cc/torchdistx/CMakeFiles/torchdistx.dir/build.make:76: src/cc/torchdistx/CMakeFiles/torchdistx.dir/deferred_init.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:888: src/cc/torchdistx/CMakeFiles/torchdistx.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Describe how to reproduce:

Build against PyTorch with CUDA 11.8

pip install --upgrade -r requirements.txt -r use-cu118.txt
cmake -DTORCHDIST_INSTALL_STANDALONE=ON -B build
cmake --build build

Describe the expected behavior:
Clean build
Environment:

  • OS: Ubuntu-20.4
  • CMake: 3.27
  • gcc/g++: 11.4 (both)

Additional context:
Add any other context about the problem here.

@goswamig goswamig added the bug Something isn't working label Jul 25, 2023
@malfet
Copy link

malfet commented Jul 26, 2023

@goswamig can you please clarify what version of PyTorch you are trying to build it against?

@fingertap
Copy link

Same error here. pip freeze | grep torch gives

pytorch-triton==2.1.0+9e3e10c5ed
torch==2.1.0.dev20230723+cu121
torchaudio==2.1.0.dev20230723+cu121
torchelastic==0.2.2
torchtext==0.15.0
torchvision==0.16.0.dev20230723+cu121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants