lucasjinreal / DCNv2_latest

DCNv2 supports decent pytorch such as torch 1.5+ (now 1.8+)
BSD 3-Clause "New" or "Revised" License
614 stars 125 forks source link

作者可以出一个支持pytorch1.7的吗 #9

Closed nostayup closed 3 years ago

nostayup commented 3 years ago

买了3090,但是目前机器只允许pytorch1.7,哭……

lucasjinreal commented 3 years ago

为什么只允许1.7, 这个周末我适配一下看看

nostayup commented 3 years ago

就是编译那一大段输出中会有报一些错,dcn_v2_cpu.o这个文件生成失败。我摘出来一部分: 2_cpu.cpp:82:9: error: ‘THFloatBlas_gemm’ was not declared in this scope

ninja: build stopped: subcommand failed.

File "/home/user/anaconda3/envs/bgmatting/lib/python3.7/site-packages/torch/ut ils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/user/anaconda3/envs/bgmatting/lib/python3.7/site-packages/torch/ut ils/cpp_extension.py", line 1538, in _run_ninja_build raise RuntimeError(message) from e

nostayup commented 3 years ago

为什么只允许1.7, 这个周末我适配一下看看

看到一篇帖子是解决这个问题的,但是我照着做了之后惨遭失败,不知道是否对你有帮助 https://blog.csdn.net/qq_36810544/article/details/110197821

nostayup commented 3 years ago

https://github.com/CharlesShang/DCNv2/pull/92 这里有一个解决方案,亲测可用

caiduoduo12138 commented 3 years ago

我还是编译不过去 Python3.7 cuda11+torch1.7 还是显示不支持compute_x86 你怎么搞得 你Torch怎么装的?conda还是pip 给终端代码,我再试试

nostayup commented 3 years ago

我还是编译不过去 Python3.7 cuda11+torch1.7 还是显示不支持compute_x86 你怎么搞得 你Torch怎么装的?conda还是pip 给终端代码,我再试试

就是正常的pytorch上面装cuda11.0的那个conda命令行,cuda就装了11.1,然后就直接编译了

caiduoduo12138 commented 3 years ago

我pip和conda 都试了,不行 要不你发一下你的安装命令行,我试试,可能我的安装姿势不对 谢谢

nostayup commented 3 years ago

我pip和conda 都试了,不行 要不你发一下你的安装命令行,我试试,可能我的安装姿势不对 谢谢

conda install pytorch torchvision torchaudio cudatoolkit=11.0 -c pytorch

hhcs9527 commented 3 years ago

add export TORCH_CUDA_ARCH_LIST="8.0 + PTX"

lucasjinreal commented 3 years ago

@hhcs9527 @nostayup @caiduoduo12138 Pytorch 1.7 was supported on master branch.

Theoretically would also works on lower or higher version. If not pls open a new issue.