mit-han-lab / nunchaku

SVDQuant: Absorbing Outliers by Low-Rank Components for 4-Bit Diffusion Models
https://hanlab.mit.edu/projects/svdquant
Apache License 2.0
343 stars 17 forks source link

RuntimeError: Error compiling objects for extension #12

Open 973398769 opened 1 week ago

973398769 commented 1 week ago
File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 183, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
    dist.run_commands()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
    self.run_command(cmd)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/command/develop.py", line 35, in run
    self.install_for_development()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/command/develop.py", line 112, in install_for_development
    self.run_command('build_ext')
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
    self.distribution.run_command(command)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/dist.py", line 950, in run_command
    super().run_command(command)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
    cmd_obj.run()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 98, in run
    _build_ext.run(self)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
    self.build_extensions()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 866, in build_extensions
    build_ext.build_extensions(self)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 476, in build_extensions
    self._build_extensions_serial()
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 502, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 263, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 557, in build_extension
    objects = self.compiler.compile(
              ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 679, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 1785, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/ubuntu/miniconda3/envs/nunchaku/lib/python3.11/site-packages/torch/utils/cpp_extension.py", line 2121, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]
ziyaxuanyi commented 1 week ago

I meet the same problem. Did you solve this?

973398769 commented 1 week ago

I solve this problem with trying another gpus. The code has some gpu architecture limitations

kelisiya commented 1 week ago

我遇到了同样的问题。您解决了这个问题吗?

+1

lmxyy commented 1 week ago

Which GPU are you using?

973398769 commented 1 week ago

This is work well for me | NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 Tesla V100-PCIE-16GB Off | 00000001:00:00.0 Off | Off |

ziyaxuanyi commented 1 week ago

我遇到了同样的问题。您解决了这个问题吗?

+1

I have resolved the issue. You need to update the third-party library code, as they all have their own specific version requirements. You need to ensure that they are all the required versions impicture_20241112_140501

lmxyy commented 1 week ago

This is work well for me | NVIDIA-SMI 535.183.01 Driver Version: 535.183.01 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+======================+======================| | 0 Tesla V100-PCIE-16GB Off | 00000001:00:00.0 Off | Off |

This is because V100 does not have INT4 CUDA core. image