Open yuchen-xue opened 6 years ago
I meet the same problem. Comment out the test_throws_on_non_1D_arrays
, everything will be ok!
i had the same problem. any news?
my output
`Traceback (most recent call last):
File "/detectron/detectron/tests/test_zero_even_op.py", line 51, in test_throws_on_non_1D_arrays
self._run_zero_even_op(X)
AssertionError: "X.ndim() == 1" does not match "[enforce fail at zero_even_op.cc:25] X.dim() == 1.
Error from operator:
input: "X" output: "Y" name: "" type: "ZeroEven"frame #0: c10::ThrowEnforceNotMet(char const, int, char const, std::__cxx11::basic_string<char, std::char_traits
Here I quote this awesome blog post from Harper Long [MineSweeping] The Long Struggle of DensePose Installation
Cause
As can be seen from the messy undefined symbol, this should have something to do with Caffe2 and probably CXX11(oh really???).
Run ldd -r /path/to/densepose/build/libcaffe2_detectron_custom_ops.so and the one or several undefined symbols with similar names will be shown, which should have been defined in libcaffe2.so. After running strings -a /path/to/pytorch/torch/lib/libcaffe2.so | grep _ZN6caffe219CPUOperator, a few similar symbols (two, in my case) would come up, but are different from the one undefined - "B5cxx11" is missing.
Why does DensePose want to find a symbol with "B5cxx11"? Who added this suffix? It should be our GCC who did it when compiling DensePose with C++11 standard!
In short, your GCC
version is wrong.
run strings -a /path/to/pytorch/torch/lib/libcaffe2.so | grep GCC:
to see with which version your Caffe2
is built
GCC: (GNU) 4.9.2 20150212 (Red Hat 4.9.2-6)
You should either install the specific version of GCC, or compile Caffe2
yourself.
Check this post for how to install GCC-4.9.2
.
Expected results
To fully pass the
test_zero_even_op.py
test.Actual results
test_zero_even_op.py
as usual, but I failed with system output listed below:During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "detectron/tests/test_zero_even_op.py", line 51, in test_throws_on_non_1D_arrays self._run_zero_even_op(X) AssertionError: "X.ndim() == 1" does not match "[enforce fail at zero_even_op.cc:25] X.dim() == 1. Error from operator: input: "X" output: "Y" name: "" type: "ZeroEven"frame #0: c10::ThrowEnforceNotMet(char const, int, char const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, void const*) + 0x76 (0x7f2c21796e06 in /home/ee303/miniconda3/envs/dat-src-py37-new-pytorch/lib/python3.7/site-packages/caffe2/python/../../torch/lib/libc10.so)
frame #1: caffe2::ZeroEvenOp<float, caffe2::CPUContext>::RunOnDevice() + 0x17a (0x7f2be4aec2aa in /home/ee303/WORKSPACE/POSE/DetectAndTrack/Detectron/build/libcaffe2_detectron_custom_ops_gpu.so)
frame #2: caffe2::Operator::Run(int) + 0x5b (0x7f2be4af6f8b in /home/ee303/WORKSPACE/POSE/DetectAndTrack/Detectron/build/libcaffe2_detectron_custom_ops_gpu.so)
frame #3: caffe2::Workspace::RunOperatorOnce(caffe2::OperatorDef const&) + 0x4a (0x7f2c335ad68a in /home/ee303/miniconda3/envs/dat-src-py37-new-pytorch/lib/python3.7/site-packages/caffe2/python/../../torch/lib/libcaffe2.so)
frame #4: + 0x5bb58 (0x7f2c34919b58 in /home/ee303/miniconda3/envs/dat-src-py37-new-pytorch/lib/python3.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.cpython-37m-x86_64-linux-gnu.so)
frame #5: + 0x5bd04 (0x7f2c34919d04 in /home/ee303/miniconda3/envs/dat-src-py37-new-pytorch/lib/python3.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.cpython-37m-x86_64-linux-gnu.so)
frame #6: + 0x95970 (0x7f2c34953970 in /home/ee303/miniconda3/envs/dat-src-py37-new-pytorch/lib/python3.7/site-packages/caffe2/python/caffe2_pybind11_state_gpu.cpython-37m-x86_64-linux-gnu.so)