Scene-Graph-Benchmark.pytorch
Scene-Graph-Benchmark.pytorch copied to clipboard
Tips for Ampere GPU users (RTX 3090, 3080/ti, etc.) to run scene graph benchmark with CUDA 11
Since Ampere GPUs only supports PyTorch built with CUDA 11 and later, we can only build this repository with CUDA 11.1 and PyTorch 1.8.1 or later. Here are the differences between the authors' installation instructions and my attempt on a machine with CUDA 11.1 and RTX 3090:
- When building APEX, one may encounter
"fatal error: ATen/cuda/CUDAGraphsUtils.cuh: No such file or directory"
, and this could be solved by executinggit reset --hard 3fe10b5597ba14a748ebb271a6ab97c09c5701ac
in the apex directory, as mentioned in the issue https://github.com/NVIDIA/apex/issues/1043 . - Then we should set the environment variable to let the apex build with the compute compatibility of Ampere GPU (compute compatibility 8.6) by executing
export TORCH_CUDA_ARCH_LIST="8.6"
. However, if you use torch 1.7.0 built with cuda 11.0, apex can't be built since the nvcc of cuda 11.0 does not support compute compatibility 8.6, but torch 1.8.1 with cuda 11.1 works. - When using torch 1.8.1, line 4 in file
maskrcnn_benchmark/utils/imports.py
should be changed toif torch._six.PY37
(I'm using python 3.7), since thetorch._six
in torch 1.8.1 does not have thePY3
attribute.
谢谢你的提醒!我是一所国内211大学的学生,研究SGG已经一年左右了,可以加个联系方式交流一下吗?
Thanks! By the way, do the pretrained models work in the new versions of PyTorch?
谢谢你的提醒!我是一所国内211大学的学生,研究SGG已经一年左右了,可以加个联系方式交流一下吗? 你好,我也是学生,刚开始接触SGG,方便加一个微信交流一下嘛
Thanks to you, I was able to solve the problem. Thanks a lot!
Thanks! I met different error on step1 "RuntimeError: Error compiling objects for extension", but your way can also solve my problem
Thanks!!! i finally succeeded to build the benchmark! as regarding RuntimError while installing apex, I change gcc version into 10. my setup was win 11 rtx 3060 cuda 11.1 pytorch 1.8.1 GCC 10
Thanks for your tips! But when I pretrained faster rcnn, torch said apex.amp has been integrated into torch. So if torch version >= 1.6, just replace from apex import amp
with from torch.cuda import amp
in program files.
Samely, we dont need install cocoapi from source code, just pip install pycocotools==2.0.0
or higher version.