-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
已解决:RuntimeError: Error compiling objects for extension #24
Comments
https://blog.csdn.net/weixin_43293172/article/details/129049372?spm=1001.2014.3001.5502 原文章步骤中,python setup.py build_ext --inplace编译的时候出现这个问题,前两个编译都已经通过了,这个出现问题 |
确保torch版本和要求的一致 |
r fu yu
新建了虚拟环境,torch和torch vision版本都是按照requirement.txt要求安装的
发自我的iPhone
…------------------ Original ------------------
From: 白鹭先生 ***@***.***>
Date: Sat,Jun 10,2023 9:58 AM
To: Egrt/yolov7-obb ***@***.***>
Cc: Schweizliu ***@***.***>, Author ***@***.***>
Subject: Re: [Egrt/yolov7-obb] RuntimeError: Error compiling objects forextension (Issue #24)
确保torch版本和要求的一致
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
torch:1.10.1+cu113 |
running build_ext
F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(108): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(109): error: identifier "n1" is undefined F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(110): error: identifier "n2" is undefined F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(112): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(117): warning: parsing restarts here after pr F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(118): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(166): warning: parsing restarts here after pr F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(167): error: expression must have a constant F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(168): error: identifier "dev_polys" is undefi F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(168): error: identifier "col_start" is undefi F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(169): error: expression must have a constant F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(169): error: variable "block_polys" has alrea F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(171): error: expression must have a constant F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(171): error: variable "block_polys" has alrea F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(173): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(176): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(219): warning: parsing restarts here after pr F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(221): error: this declaration has no storage F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(221): error: expected a ";" F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(224): warning: parsing restarts here after pr F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(226): error: identifier "boxes_num" is undefi F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(226): error: identifier "col_blocks" is undef F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(227): error: this declaration has no storage F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(227): error: declaration is incompatible with F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(227): error: identifier "mask_dev" is undefin F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(227): error: too many initializer values F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(236): error: this declaration has no storage F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(236): error: declaration is incompatible with F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(236): error: too many initializer values F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(236): error: a value of type "size_t *" canno F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(238): error: identifier "boxes" is undefined F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(242): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(255): warning: parsing restarts here after pr F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(257): error: expected a declaration F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(260): error: expected a declaration C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xstring(438): C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xmemory(1792):
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include\xutility(4448)
F:\code\yolov7-obb-master\utils\nms_rotated\src\poly_nms_cuda.cu(24): warning: variable "eps" was declared but 34 errors detected in the compilation of "F:/code/yolov7-obb-master/utils/nms_rotated/src/poly_nms_cuda.cu".
|
注意: 包含文件: C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\torch\include\torch/csrc/autogra
The above exception was the direct cause of the following exception: Traceback (most recent call last): |
您好,请问这个要怎么修改呀? |
在你的ide环境里面找,我的是pycharm图上红色标注了 |
你好 可以留个联系方式交流下吗 |
你好,请问这个问题你是怎么解决的 |
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "setup.py", line 38, in
setup(
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_init_.py", line 87, in setup
return distutils.core.setup(**attrs)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\core.py", line 185, in setu
p
return run_commands(dist)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\core.py", line 201, in run_
commands
dist.run_commands()
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\dist.py", line 969, in run_
commands
self.run_command(cmd)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools\dist.py", line 1208, in run_command
super().run_command(command)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\dist.py", line 988, in run_
command
cmd_obj.run()
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools\command\build_ext.py", line 84, in run
_build_ext.run(self)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\command\build_ext.py", line
346, in run
self.build_extensions()
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\torch\utils\cpp_extension.py", line 735, in build
_extensions
build_ext.build_extensions(self)
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\command\build_ext.py", line
468, in build_extensions
self._build_extensions_serial()
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\setuptools_distutils\command\build_ext.py", line
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\torch\utils\cpp_extension.py", line 708, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\torch\utils\cpp_extension.py", line 1399, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\ProgramData\anaconda3\envs\yolo\lib\site-packages\torch\utils\cpp_extension.py", line 1733, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
The text was updated successfully, but these errors were encountered: