apex编译
问题:
解决方法:
使用别人提供的forked version https://github.com/kezewang/apex
maskrcnn-benchmark编译
问题:
error LNK2001: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl c10::cuda::CUDAStream::operator struct CUstream_st *(void)const " (_imp??BCUDAStream@cuda@c10@@QEBAPEAUCUstream_st@@XZ)
解决方法:
修改setup.py文件
添加
extra_compile_args = {"cxx": ['/MD']}
extra_link_args = ['c10_cuda.lib','/NODEFAULTLIB:LIBCMT.LIB']
修改
ext_modules = [
extension(
"maskrcnn_benchmark._C",
sources,
include_dirs=include_dirs,
define_macros=define_macros,
extra_compile_args=extra_compile_args,
)
]
为
ext_modules = [
extension(
"maskrcnn_benchmark._C",
sources,
include_dirs=include_dirs,
define_macros=define_macros,
extra_compile_args=extra_compile_args,
extra_link_args = extra_link_args,
)
]
Domain-Adaptive-Faster-RCNN-PyTorch
解决方法:
https://blog.csdn.net/tanmx219/article/details/87827035