see https://github.com/Soarkey/tracking_raw_results/blob/master/compile_ocean_dcn_on_3090.md
1. Environment
- Ubuntu 20
- Python 3.7
- CUDA 11.4
- PyTorch 1.9.0+cu111
2. Modification / Modification
Find the lib/models/dcn/src/deform_conv.py
file, replace all AT_CHECK
with TORCH_CHECK
, and replace all .view
operations with .reshape
Operation, then re-execute the compilation python setup.py develop
.
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. Possible problems and solutions / References
> ValueError: Unknown CUDA arch (8.6) or GPU not supported
Solution / Solution
cpp_extension.py
content of 0612ba0ffd2181 in the folder where the conda environment is located from: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']
To
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']
The difference is that with the addition of 8.6 support, 3090 belongs to the sm86 architecture.
- see solution: https://blog.csdn.net/ng323/article/details/116940299)
> undefined symbol: THPVariableClass
- Reason: When importing some third-party packages related to pytorch, if you import the third-party package first, this kind of error is prone to occur. The correct way is to import pytorch first.
- see solution: https://blog.csdn.net/slow122/article/details/116030717
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。