Skip to content
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

sh make.sh issue #112

Open
LiGuo12 opened this issue Jul 13, 2024 · 3 comments
Open

sh make.sh issue #112

LiGuo12 opened this issue Jul 13, 2024 · 3 comments

Comments

@LiGuo12
Copy link

LiGuo12 commented Jul 13, 2024

When I run sh make.sh, it show the following error.

My Python version: 3.8.17
PyTorch version: 2.0.1+cu118
CUDA version: 11.8
CUDA_HOME is set correctly

Here is the error:
running install
running bdist_egg
running egg_info
writing manifest file 'MultiScaleDeformableAttention.egg-info\SOURCES.txt'
running install_lib
running build_py
running build_ext
D:\anaconda\envs\vit\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
D:\anaconda\envs\vit\lib\site-packages\setuptools\command\easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py:359: UserWarning: Error checking compiler version for cl: 'cp1' codec can't decode bytes in position 0--1: No mapping for the Unicode character exists in the target code page.
warnings.warn(f'Error checking compiler version for {compiler}: {error}')
Emitting ninja build file D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc --generate-dependencies-with-compile --dependency-output D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.obj.d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -ID:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src -ID:\anaconda\envs\vit\lib\site-packages\torch\include -ID:\anaconda\envs\vit\lib\site-packages\torch\include\torch\csrc\api\include -ID:\anaconda\envs\vit\lib\site-packages\torch\include\TH -ID:\anaconda\envs\vit\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -ID:\anaconda\envs\vit\include -ID:\anaconda\envs\vit\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.cu -o D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61
FAILED: D:/code/ubc/project_dev/code_revise_paper/detectron2/MaskDINO/maskdino/modeling/pixel_decoder/ops/build/temp.win-amd64-3.8/Release/code/ubc/project_dev/code_revise_paper/detectron2/MaskDINO/maskdino/modeling/pixel_decoder/ops/src/cuda/ms_deform_attn_cuda.obj
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc --generate-dependencies-with-compile --dependency-output D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.obj.d --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -DWITH_CUDA -ID:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src -ID:\anaconda\envs\vit\lib\site-packages\torch\include -ID:\anaconda\envs\vit\lib\site-packages\torch\include\torch\csrc\api\include -ID:\anaconda\envs\vit\lib\site-packages\torch\include\TH -ID:\anaconda\envs\vit\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -ID:\anaconda\envs\vit\include -ID:\anaconda\envs\vit\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt" -c D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.cu -o D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.obj -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=MultiScaleDeformableAttention -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61
D:/anaconda/envs/vit/lib/site-packages/torch/include\c10/macros/Macros.h(138): warning C4067: 预处理器指令后有意外标记 - 应输入换行符
D:/anaconda/envs/vit/lib/site-packages/torch/include\c10/macros/Macros.h(138): warning C4067: 预处理器指令后有意外标记 - 应输入换行符
ms_deform_attn_cuda.cu
nvcc fatal : Could not open output file D:\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\build\temp.win-amd64-3.8\Release\code\ubc\project_dev\code_revise_paper\detectron2\MaskDINO\maskdino\modeling\pixel_decoder\ops\src\cuda\ms_deform_attn_cuda.obj.d
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py", line 1893, in _run_ninja_build
subprocess.run(
File "D:\anaconda\envs\vit\lib\subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "setup.py", line 71, in
setup(
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_init_.py", line 155, in setup
return distutils.core.setup(**attrs)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\core.py", line 148, in setup
return run_commands(dist)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\core.py", line 163, in run_commands
dist.run_commands()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\dist.py", line 967, in run_commands
self.run_command(cmd)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\install.py", line 74, in run
self.do_egg_install()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\install.py", line 116, in do_egg_install
self.run_command('bdist_egg')
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\dist.py", line 986, in run_command
cmd_obj.run()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\build_ext.py", line 79, in run
_build_ext.run(self)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py", line 843, in build_extensions
build_ext.build_extensions(self)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\command\build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\command\build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools\command\build_ext.py", line 202, in build_extension
_build_ext.build_extension(self, ext)
File "D:\anaconda\envs\vit\lib\site-packages\Cython\Distutils\build_ext.py", line 135, in build_extension
super(build_ext, self).build_extension(ext)
File "D:\anaconda\envs\vit\lib\site-packages\setuptools_distutils\command\build_ext.py", line 528, in build_extension
objects = self.compiler.compile(sources,
File "D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py", line 815, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py", line 1574, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "D:\anaconda\envs\vit\lib\site-packages\torch\utils\cpp_extension.py", line 1909, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

Has anyone encountered this problem? Does anyone have any solution?

@LiGuo12
Copy link
Author

LiGuo12 commented Jul 13, 2024

solved

@YoussefNawar
Copy link

how did you solve it?

@LiGuo12
Copy link
Author

LiGuo12 commented Aug 19, 2024

how did you solve it?

Since the folder path is too long. Put the MaskDINO code folder in D:\ to shorten the folder path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants