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

cmake: refined conditions for math library linking on windows #11312

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xarbirus
Copy link
Contributor

@Xarbirus Xarbirus commented Jan 20, 2025

I encountered some problems when building llama.cpp on windows (for x64 and arm64) on a system where MSVC (with clang) and mingw are installed at the same time.

It seems to me that the condition for adding MATH_LIBRARY to the build is not quite correct. MATH_LIBRARY should not be added if

  • Intel oneAPI is already used (since these libraries include optimized math libraries and tools)
  • or the MSVC compiler is used

An important addition - in case clang is used in the MSVC pipeline, we should not add the library (condition CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC" was added for this). At the same time, when building with mingw, the library can be added.

I think this would also be a solution to this issue (if it hadn't closed).

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jan 20, 2025
@slaren
Copy link
Collaborator

slaren commented Jan 28, 2025

I encountered some problems when building llama.cpp on windows (for x64 and arm64) on a system where MSVC (with clang) and mingw are installed at the same time.

Can you suggest a way to reproduce the issue that you are seeing? Does it happen with a specific version of mingw? I have mingw installed alongside MSVC, and the github runners do as well, so at least it doesn't happen in every case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants