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

RuntimeError: Error compiling objects for extension #1415

Open
ProgramerSalar opened this issue Dec 27, 2024 · 0 comments
Open

RuntimeError: Error compiling objects for extension #1415

ProgramerSalar opened this issue Dec 27, 2024 · 0 comments

Comments

@ProgramerSalar
Copy link

i was follow this chat gpt blog:

To install FlashAttention on your computer, follow these steps:

  1. Install Required Dependencies:

    • Ensure you have CUDA toolkit or ROCm toolkit installed.
    • Make sure you have PyTorch 1.12 or above.
    • Install the packaging and ninja Python packages:
      pip install packaging ninja
  2. Clone the FlashAttention Repository:

    • Open your Command Prompt or terminal and run:
      git clone https://github.com/Dao-AILab/flash-attention.git
      cd flash-attention
  3. Install FlashAttention:

    • Navigate to the FlashAttention directory:
      cd hopper
    • Run the installation command:
      python setup.py install

Then i will get this error how i can solve it:
please give the response instead

Traceback (most recent call last):
File "D:\test\flash-attention\hopper\setup.py", line 311, in
setup(
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_init_.py", line 108, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\core.py", line 184, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\core.py", line 200, in run_commands
dist.run_commands()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\dist.py", line 970, in run_commands
self.run_command(cmd)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\dist.py", line 945, in run_command
super().run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\dist.py", line 989, in run_command
cmd_obj.run()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\install.py", line 92, in run
self.do_egg_install()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\install.py", line 144, in do_egg_install
self.run_command('bdist_egg')
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\dist.py", line 945, in run_command
super().run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\dist.py", line 989, in run_command
cmd_obj.run()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\bdist_egg.py", line 167, in run
cmd = self.call_command('install_lib', warn_dir=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\bdist_egg.py", line 153, in call_command
self.run_command(cmdname)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\dist.py", line 945, in run_command
super().run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\dist.py", line 989, in run_command
cmd_obj.run()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\install_lib.py", line 13, in run
self.build()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\command\install_lib.py", line 110, in build
self.run_command('build_ext')
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\cmd.py", line 316, in run_command
self.distribution.run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\dist.py", line 945, in run_command
super().run_command(command)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\dist.py", line 989, in run_command
cmd_obj.run()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\build_ext.py", line 93, in run
_build_ext.run(self)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\command\build_ext.py", line 359, in run
self.build_extensions()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\torch\utils\cpp_extension.py", line 866, in build_extensions
build_ext.build_extensions(self)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\command\build_ext.py", line 479, in build_extensions
self._build_extensions_serial()
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\command\build_ext.py", line 505, in _build_extensions_serial
self.build_extension(ext)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools\command\build_ext.py", line 254, in build_extension
_build_ext.build_extension(self, ext)
File "C:\Users\manis.conda\envs\test\Lib\site-packages\setuptools_distutils\command\build_ext.py", line 560, in build_extension
objects = self.compiler.compile(
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\manis.conda\envs\test\Lib\site-packages\torch\utils\cpp_extension.py", line 838, in win_wrap_ninja_compile
_write_ninja_file_and_compile_objects(
File "C:\Users\manis.conda\envs\test\Lib\site-packages\torch\utils\cpp_extension.py", line 1785, in _write_ninja_file_and_compile_objects
_run_ninja_build(
File "C:\Users\manis.conda\envs\test\Lib\site-packages\torch\utils\cpp_extension.py", line 2121, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension

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

1 participant