Skip to content

ninja: build stopped: subcommand failed. #17

Description

@wangfei-cs

I'm using pytorch 0.4.1, when i ran demo.py,

compiling/loading roi_align
/home/feiw/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py:118: UserWarning: 

                               !! WARNING !!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Your compiler (c++) 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))
Detected CUDA files, patching ldflags
Emitting ninja build file /home/feiw/Detectron/detectorch/lib/cppcuda/build/build.ninja...
Building extension module roialign...
Traceback (most recent call last):
  File "/home/feiw/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 759, in _build_extension_module
    ['ninja', '-v'], stderr=subprocess.STDOUT, cwd=build_directory)
  File "/home/feiw/anaconda3/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/home/feiw/anaconda3/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "demo.py", line 25, in <module>
    from model.detector import detector
  File "lib/model/detector.py", line 5, in <module>
    from model.roi_align import RoIAlignFunction, preprocess_rois
  File "lib/model/roi_align.py", line 18, in <module>
    build_directory=build_path,verbose=True)
  File "/home/feiw/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 514, in load
    with_cuda=with_cuda)
  File "/home/feiw/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 682, in _jit_compile
    _build_extension_module(name, build_directory)
  File "/home/feiw/anaconda3/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 765, in _build_extension_module
    name, error.output.decode()))
RuntimeError: Error building extension 'roialign': [1/4] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu -o roi_align_forward_cuda.cuda.o
FAILED: roi_align_forward_cuda.cuda.o 
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu -o roi_align_forward_cuda.cuda.o
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:173:82: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(input.ndimension() == 4, "Input to RoI Align should be a NCHW Tensor");
                                                                                  ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:178:105: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.ndimension() == 2, "RoI Proposals should be a 2D Tensor, (batch_sz x proposals)");
                                                                                                         ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:179:109: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.size(1) == 5, "Proposals should be of the form [batch_index startW startH endW enH]");
                                                                                                             ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:189:62: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(input.is_contiguous(), "input must be contiguous");
                                                              ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:190:74: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.is_contiguous(), "bottom_rois must be contiguous");
                                                                          ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_forward_cuda.cu:209:81: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(cudaGetLastError() == cudaSuccess, "roi_align_forward_kernel failed");
                                                                                 ^
[2/4] /usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu -o roi_align_backward_cuda.cuda.o
FAILED: roi_align_backward_cuda.cuda.o 
/usr/local/cuda/bin/nvcc -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 --compiler-options '-fPIC' -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu -o roi_align_backward_cuda.cuda.o
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu:225:105: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.ndimension() == 2, "RoI Proposals should be a 2D Tensor, (batch_sz x proposals)");
                                                                                                         ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu:226:109: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.size(1) == 5, "Proposals should be of the form [batch_index startW startH endW enH]");
                                                                                                             ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu:231:87: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(roi_cols == 4 || roi_cols == 5, "RoI Proposals should have 4 or 5 columns");
                                                                                       ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu:236:74: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.is_contiguous(), "bottom_rois must be contiguous");
                                                                          ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cuda.cu:256:81: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(cudaGetLastError() == cudaSuccess, "roi_align_forward_kernel failed");
                                                                                 ^
[3/4] c++ -MMD -MF roi_align_binding.o.d -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp -o roi_align_binding.o
FAILED: roi_align_binding.o 
c++ -MMD -MF roi_align_binding.o.d -DTORCH_EXTENSION_NAME=roialign -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/TH -I/home/feiw/anaconda3/lib/python3.6/site-packages/torch/lib/include/THC -I/usr/local/cuda/include -I/home/feiw/anaconda3/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++11 -c /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp -o roi_align_binding.o
In file included from /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp:2:0:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:237:84: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(input.ndimension() == 4, "Input to RoI Pooling should be a NCHW Tensor");
                                                                                    ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:242:105: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.ndimension() == 2, "RoI Proposals should be a 2D Tensor, (batch_sz x proposals)");
                                                                                                         ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:243:109: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.size(1) == 5, "Proposals should be of the form [batch_index startW startH endW enH]");
                                                                                                             ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:251:87: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(roi_cols == 4 || roi_cols == 5, "RoI Proposals should have 4 or 5 columns");
                                                                                       ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:257:62: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(input.is_contiguous(), "input must be contiguous");
                                                              ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:258:74: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.is_contiguous(), "bottom_rois must be contiguous");
                                                                          ^
In file included from /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp:3:0:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp:205:105: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.ndimension() == 2, "RoI Proposals should be a 2D Tensor, (batch_sz x proposals)");
                                                                                                         ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp:206:109: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.size(1) == 5, "Proposals should be of the form [batch_index startW startH endW enH]");
                                                                                                             ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp:211:87: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(roi_cols == 4 || roi_cols == 5, "RoI Proposals should have 4 or 5 columns");
                                                                                       ^
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp:216:74: error: macro "AT_ASSERT" passed 2 arguments, but takes just 1
   AT_ASSERT(bottom_rois.is_contiguous(), "bottom_rois must be contiguous");
                                                                          ^
In file included from /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp:2:0:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp: In function ‘at::Tensor at::contrib::roi_align_forward_cpu(const at::Tensor&, const at::Tensor&, int64_t, int64_t, double, int64_t)’:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_cpu.cpp:237:3: error: ‘AT_ASSERT’ was not declared in this scope
   AT_ASSERT(input.ndimension() == 4, "Input to RoI Pooling should be a NCHW Tensor");
   ^
In file included from /home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_binding.cpp:3:0:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp: In function ‘at::Tensor at::contrib::roi_align_backward_cpu(const at::Tensor&, const at::Tensor&, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, double, int64_t)’:
/home/feiw/Detectron/detectorch/lib/cppcuda/roi_align_backward_cpu.cpp:205:3: error: ‘AT_ASSERT’ was not declared in this scope
   AT_ASSERT(bottom_rois.ndimension() == 2, "RoI Proposals should be a 2D Tensor, (batch_sz x proposals)");
   ^
ninja: build stopped: subcommand failed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions