由于新显卡最低支持的cuda版本为11.1,安装flownet2的过程中发现无法完美兼容。
源码
我已经按照下面的解决方案,将修改后代码放到下面的链接了。
源码地址
解决方案
将networks当中的三个package下所有的setup.py 中的第8行改成c++14’
Replace Line 8 with cxx_args = [’-std=c++14’]. Making this change in all the setup.py files should fix the issues.
#!/usr/bin/env python3
import os
import torch
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
cxx_args = ['-std=c++14'] #需要修改的地方,默认为11
nvcc_args = [
'-gencode', 'arch=compute_37,code=sm_37',
'-gencode', 'arch=compute_52,code=sm_52',
'-gencode', 'arch=compute_60,code=sm_60',
'-gencode', 'arch=compute_61,code=sm_61',
'-gencode', 'arch=compute_70,code=sm_70',源码
'-gencode', 'arch=compute_70,code=compute_70'
]
setup(
name='channelnorm_cuda',
ext_modules=[
CUDAExtension('channelnorm_cuda', [
'channelnorm_cuda.cc',
'channelnorm_kernel.cu'
], extra_compile_args={'cxx': cxx_args, 'nvcc': nvcc_args})
],
cmdclass={
'build_ext': BuildExtension
})
然后按照官方教程重新执行bash ./install.sh就可以了。