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

ERROR: Failed building wheel for raytracing #50

Open
y455293511 opened this issue Nov 20, 2024 · 3 comments
Open

ERROR: Failed building wheel for raytracing #50

y455293511 opened this issue Nov 20, 2024 · 3 comments

Comments

@y455293511
Copy link

platform : win11, gpu A4000
i have tried cuda11.3 11.7 11.8 ; python 3.7 3.8 3.10 3.12; eigen 3.3.7 3.3.9 3.4.0
it always reporting this error, Please help me!
F:\yxy\experiment\Raytracing\raytracing\eigen-3.3.7\Eigen\src/Core/util/DisableStupidWarnings.h(80): warning #20236-D: pragma "diag_suppress" is deprecated, use "nv_diag_suppress" instead

  1 error detected in the compilation of "F:/yxy/experiment/Raytracing/raytracing/src/raytracer.cu".

  raytracer.cu

  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py", line 1746, in _run_ninja_build
      env=env)
    File "D:\Programs\conda\envs\raytracing\lib\subprocess.py", line 512, in run
      output=stdout, stderr=stderr)
  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 "<string>", line 36, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "F:\yxy\experiment\Raytracing\raytracing\setup.py", line 157, in <module>
      'dearpygui',
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\__init__.py", line 103, in setup      
      return distutils.core.setup(**attrs)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\dist.py", line 963, in run_command    
      super().run_command(command)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\wheel\bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\dist.py", line 963, in run_command    
      super().run_command(command)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
      self.run_command(cmd_name)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\dist.py", line 963, in run_command    
      super().run_command(command)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\command\build_ext.py", line 88, in run
      _build_ext.run(self)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
      self.build_extensions()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py", line 741, in build_extensions
      build_ext.build_extensions(self)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\command\build_ext.py", line 249, in build_extension
      _build_ext.build_extension(self, ext)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\setuptools\_distutils\command\build_ext.py", line 555, in build_extension
      depends=ext.depends,
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py", line 723, in win_wrap_ninja_compile
      with_cuda=with_cuda)
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py", line 1424, in _write_ninja_file_and_compile_objects
      error_prefix='Error compiling objects for extension')
    File "D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py", line 1756, in _run_ninja_build
      raise RuntimeError(message) from e
  RuntimeError: Error compiling objects for extension
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for raytracing
Running setup.py clean for raytracing
Failed to build raytracing
ERROR: Could not build wheels for raytracing, which is required to install pyproject.toml-based projects

@y455293511
Copy link
Author

One of the errors is very suspicious, but I don't know the specific meaning:

F:\yxy\experiment\Raytracing\raytracing\eigen-3.3.7\Eigen\src/Core/arch/CUDA/Half.h(212): error: more than one instance of overloaded function "__hadd" matches the argument list:
function "__hadd(int, int)"
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\crt/device_functions.h(2210): here
function "__hadd(__half, __half)"
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\cuda_fp16.hpp(1958): here
argument types are: (const Eigen::half, const Eigen::half)

@YaoanGao
Copy link

This is an Eigen bug.
I managed to fix this by referring to Eigen patch
Hope this helps

@tyouthfor
Copy link

Change the first line of the _run_ninja_build function in the file D:\Programs\conda\envs\raytracing\lib\site-packages\torch\utils\cpp_extension.py from ['ninja', '-v'] to ['ninja', '--version'].

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

3 participants