KaihuaTang / Scene-Graph-Benchmark.pytorch

A new codebase for popular Scene Graph Generation methods (2020). Visualization & Scene Graph Extraction on custom images/datasets are provided. It's also a PyTorch implementation of paper “Unbiased Scene Graph Generation from Biased Training CVPR 2020”
MIT License
1.03k stars 228 forks source link

error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 #73

Closed BooPatienze closed 3 years ago

BooPatienze commented 3 years ago

❓ Questions and Help

I follow the instruction to do:

# install apex
cd $INSTALL_DIR
git clone https://github.com/NVIDIA/apex.git
cd apex
python setup.py install --cuda_ext --cpp_ext

but this problem is occurred when I run python setup.py install --cuda_ext --cpp_ext.

Detail outputs: ...... csrc/mlp.cpp:147:46: error: expected primary-expression before ‘>’ token grad_o.contiguous().data_ptr<scalar_t>(), ^ /home/lpz/workspace/SceneGraphParse/sgg_benchmark/lib/python3.6/site-packages/torch/include/ATen/Dispatch.h:12:12: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ return __VA_ARGS__(); \ ^~~~~~~~~~~ csrc/mlp.cpp:123:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(inputs[0].type(), "mlp_backward", [&] { ^ csrc/mlp.cpp:147:48: error: expected primary-expression before ‘)’ token grad_o.contiguous().data_ptr<scalar_t>(), ^ /home/lpz/workspace/SceneGraphParse/sgg_benchmark/lib/python3.6/site-packages/torch/include/ATen/Dispatch.h:12:12: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE’ return __VA_ARGS__(); \ ^~~~~~~~~~~ csrc/mlp.cpp:123:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND_HALF’ AT_DISPATCH_FLOATING_TYPES_AND_HALF(inputs[0].type(), "mlp_backward", [&] { ^ csrc/mlp.cpp:148:43: error: expected primary-expression before ‘>’ token ......

here is my envirnment params: CUDA: 10.0.130 gcc version: 7.3.0 python: 3.6 torch: 1.2.0 torchvision: 0.4.0 System: Ubuntu 18.04

Finally, thanks for your help!

KaihuaTang commented 3 years ago

I'm not sure. Maybe you can post your question here: https://github.com/facebookresearch/maskrcnn-benchmark/issues

BooPatienze commented 3 years ago

I'm not sure. Maybe you can post your question here: https://github.com/facebookresearch/maskrcnn-benchmark/issues

谢谢~在您发的链接里找到了合适我的解决方法:https://blog.csdn.net/mm1327/article/details/106878984#commentBox