3090编译Ocean可变形卷积 / Compile Ocean DCN on 3090
see https://github.com/Soarkey/tr...1.环境 / Environment
- Ubuntu 20
- Python 3.7
- CUDA 11.4
- PyTorch 1.9.0+cu111
lib/models/dcn/src/deform_conv.py
文件, 将所有的AT_CHECK
替换为TORCH_CHECK
, 同时将所有的.view
操作替换为.reshape
操作, 之后重新执行编译
python setup.py develop
.【3090编译Ocean可变形卷积 / Compile Ocean DCN on 3090】Found file
lib/models/dcn/src/deform_conv.py
, replace all AT_CHECK
and .view
operations with TORCH_CHECK
and .reshape
, then recompile python setup.py develop
.3.可能碰到的问题及解决 / References > ValueError: Unknown CUDA arch (8.6) or GPU not supported
- 解决 / Solution
将conda环境所在文件夹中的cpp_extension.py
内容从:
named_arches = collections.OrderedDict([ ('Kepler+Tesla', '3.7'), ('Kepler', '3.5+PTX'), ('Maxwell+Tegra', '5.3'), ('Maxwell', '5.0; 5.2+PTX'), ('Pascal', '6.0; 6.1+PTX'), ('Volta', '7.0+PTX'), ('Turing', '7.5+PTX'), ]) supported_arches = ['3.5', '3.7', '5.0', '5.2', '5.3', '6.0', '6.1', '6.2', '7.0', '7.2', '7.5']
改为
named_arches = collections.OrderedDict([ ('Kepler+Tesla', '3.7'), ('Kepler', '3.5+PTX'), ('Maxwell+Tegra', '5.3'), ('Maxwell', '5.0; 5.2+PTX'), ('Pascal', '6.0; 6.1+PTX'), ('Volta', '7.0+PTX'), ('Turing', '7.5+PTX'), ('Ampere', '8.0; 8.6+PTX'), ]) supported_arches = ['3.5', '3.7', '5.0', '5.2', '5.3', '6.0', '6.1', '6.2', '7.0', '7.2', '7.5', '8.0', '8.6']
区别在于:增加了8.6的支持, 3090就是属于sm86架构.
- see solution: https://blog.csdn.net/ng323/a...)
- 原因: 在导入某些和pytorch有关的第三方包时,如果先导入第三方包,容易发生这种错误,正确的做法是首先导入pytorch。
- see solution: https://blog.csdn.net/slow122...
推荐阅读
- 《Unix网络编程》第一卷第三版|《Unix网络编程》第一卷第三版 源码编译
- maven使用tomcat7插件编译jsp出错
- 嵌入式(编译内核、根文件系统等)
- Centos6源码编译安装2.4版本http服务步骤
- 一键编译部署Mysql
- 防止sql注入
- 编程语言主要类型
- 解释器与编译器都是什么()
- Android|Android JNI 篇 - 编译 bilibili/ijkPlayer
- SCI论文写作怎样巧用英语单词--Editideas(辑思编译)