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

Fix Compilation with Flash Attention #1818

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

MahmoudAshraf97
Copy link
Contributor

Hello, in CMakeList, the library is defined twice in case flash attention was enabled resulting in this error:

CMake Error at /home/mahmoud/.local/lib/python3.10/site-packages/cmake/data/share/cmake-3.27/Modules/FindCUDA.cmake:2012 (add_library):
  add_library cannot create target "ctranslate2" because another target with
  the same name already exists.  The existing target is a shared library
  created in source directory "/mnt/e/Projects/ctranslate2".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  CMakeLists.txt:586 (cuda_add_library)

This PR adds the needed files to sources list without redefining the library

@minhthuc2502
Copy link
Collaborator

Look good to me. Thank you for your PR.

@minhthuc2502 minhthuc2502 merged commit 8460993 into OpenNMT:master Nov 25, 2024
13 checks passed
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

Successfully merging this pull request may close these issues.

2 participants