Details
ggml : revert to -lm linking instead of find_library (#22355)
- ggml : revert to -lm linking instead of find_library
find_library(MATH_LIBRARY m) was introduced recently, but it breaks
CUDA compilation with GGML_STATIC. I could not find any valid use case
where we would prefer find_library over the standard -lm approach.
This commit is also meant to start a discussion if there is a valid
reason to keep find_library(MATH_LIBRARY m), we should clarify what
problem it was solving and find an alternative fix that does not break
CUDA with GGML_STATIC.
Signed-off-by: Adrien Gallouët angt@huggingface.co
- ggml : use MATH_LIBRARY only if defined
Signed-off-by: Adrien Gallouët angt@huggingface.co
- ggml : fix initial broken condition
Signed-off-by: Adrien Gallouët angt@huggingface.co
- ggml : always respect MATH_LIBRARY when defined
Signed-off-by: Adrien Gallouët angt@huggingface.co
Signed-off-by: Adrien Gallouët angt@huggingface.co
macOS/iOS:
- macOS Apple Silicon (arm64)
- macOS Apple Silicon (arm64, KleidiAI enabled)
- macOS Intel (x64)
- iOS XCFramework
Linux:
- Ubuntu x64 (CPU)
- Ubuntu arm64 (CPU)
- Ubuntu s390x (CPU)
- Ubuntu x64 (Vulkan)
- Ubuntu arm64 (Vulkan)
- Ubuntu x64 (ROCm 7.2)
- Ubuntu x64 (OpenVINO)
- Ubuntu x64 (SYCL FP32)
- Ubuntu x64 (SYCL FP16)
Android:
Windows:
- Windows x64 (CPU)
- Windows arm64 (CPU)
- Windows x64 (CUDA 12) - CUDA 12.4 DLLs
- Windows x64 (CUDA 13) - CUDA 13.1 DLLs
- Windows x64 (Vulkan)
- Windows x64 (SYCL)
- Windows x64 (HIP)
openEuler: