Can't disable CMAKE ARG on Apple: GGML_METAL=OFF
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 65/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Área
- build-system
Línea de trabajo
El issue apunta a la línea 95 del archivo principal CMakeLists.txt. Examina esa línea y la lógica que la rodea para entender cómo se fuerza GGML_METAL en las plataformas de Apple. El objetivo es modificar la lógica de CMake para permitir que se respete un flag GGML_METAL=OFF proporcionado por el usuario, conservando el comportamiento predeterminado. Prueba el cambio compilando con los CMAKE_ARGS proporcionados para asegurarte de que Vulkan funciona y Metal está deshabilitado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Expected Behavior
I can disable GGML_METAL and enable GGML_VULKAN.
Current Behavior
Due to this line in the CMAKE config I cannot set GGML_METAL=OFF as it is forced.
Environment and Context
I'm trying to build GGML_VULKAN=ON with Metal off as I want to use MoltenVK on my Intel MBP with an AMD GPU. I have already successfully don't this directly with llama.cpp.
I am having to resort to cloning the repo and patching the lines by hand, which is not ideal.
- Physical (or virtual) hardware you are using, e.g. for Linux:
2019 Intel MBP
- Operating System, e.g. for Linux:
MacOS 15.5
- SDK version, e.g. for Linux:
Python 3.11.9
GNU Make 3.81
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: x86_64-apple-darwin24.5.0
Thread model: posix
Steps to Reproduce
CMAKE_ARGS="-DGGML_METAL=OFF -DGGML_VULKAN=ON \
-DVulkan_INCLUDE_DIR=/Users/brenden/VulkanSDK/1.4.309.0/macOS/include \
-DVulkan_LIBRARY=/Users/brenden/VulkanSDK/1.4.309.0/macOS/lib/libMoltenVK.dylib \
-DOpenMP_ROOT=$(brew --prefix)/opt/libomp \
-DVulkan_GLSLC_EXECUTABLE=$(brew --prefix)/opt/shaderc/bin/glslc \
-DVulkan_GLSLANG_VALIDATOR_EXECUTABLE=$(brew --prefix)/opt/glslang/bin/glslangValidator \
-DOpenMP_C_FLAGS=-fopenmp=lomp \
-DOpenMP_CXX_FLAGS=-fopenmp=lomp \
-DOpenMP_C_LIB_NAMES=libomp \
-DOpenMP_CXX_LIB_NAMES=libomp \
-DOpenMP_libomp_LIBRARY=$(brew --prefix)/opt/libomp/lib/libomp.dylib \
-DOpenMP_CXX_FLAGS=\"-Xpreprocessor -fopenmp $(brew --prefix)/opt/libomp/lib/libomp.dylib -I$(brew --prefix)/opt/libomp/include\" \
-DOpenMP_CXX_LIB_NAMES=libomp \
-DOpenMP_C_FLAGS=\"-Xpreprocessor -fopenmp $(brew --prefix)/opt/libomp/lib/libomp.dylib -I$(brew --prefix)/opt/libomp/include\"" FORCE_CMAKE=1 pip install --no-binary=llama-cpp-python --no-cache-dir -v llama-cpp-python
(NOTE: These args are derived from what I used to compile a MoltenVK/Vulkan build of llama.cpp using a version of llama.cpp that is from June 2025.
GGML Metal backend runs when you run the server.
- Lenguaje dominante
- Python
- Estrellas
- 10.6k
- Forks
- 1.5k
- Merge medio
- 6 h 43 min
- PR fusionados (30 d)
- 2
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de abetlen/llama-cpp-python
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
abetlen/llama-cpp-python#2371 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2352 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
abetlen/llama-cpp-python#2314 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2211 · 2 comentarios ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
abetlen/llama-cpp-python#2210 ·
Todos los issues de abetlen/llama-cpp-python
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
spec-kitty/spec-kitty#5319 ·
Los mantenedores suelen responder en 1 día
-
backend::vllm diffusion multimodal
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
openai/openai-agents-python#5229 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día