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

Compile bug: Emulated Linux ARM64 CPU build fails #10933

Open
SamuelTallet opened this issue Dec 21, 2024 · 2 comments
Open

Compile bug: Emulated Linux ARM64 CPU build fails #10933

SamuelTallet opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working build Compilation issues

Comments

@SamuelTallet
Copy link
Contributor

SamuelTallet commented Dec 21, 2024

Git commit

5cd85b5

Operating systems

Linux

GGML backends

CPU

Problem description & steps to reproduce

My Docker ARM64 build (based on Alpine Linux 3.20) fails while compiling the CPU flavor of LLaMA.cpp.
Additional context: It's a GitHub Action using QEMU.

First Bad Commit

Between 0a11f8b and 5cd85b5, I suspect 21ae3b9

Relevant log output

# cmake -B build -DLLAMA_BUILD_SERVER=ON -DLLAMA_CURL=ON -DBUILD_SHARED_LIBS=OFF
-- The C compiler identification is GNU 13.2.1
-- The CXX compiler identification is GNU 13.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.45.2")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
-- CMAKE_SYSTEM_PROCESSOR: aarch64
-- Including CPU backend
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- ARM detected
-- Performing Test GGML_COMPILER_SUPPORTS_FP16_FORMAT_I3E
-- Performing Test GGML_COMPILER_SUPPORTS_FP16_FORMAT_I3E - Failed
-- ARM -mcpu not found, -mcpu=native will be used
-- Performing Test GGML_MACHINE_SUPPORTS_dotprod
-- Performing Test GGML_MACHINE_SUPPORTS_dotprod - Failed
-- Performing Test GGML_MACHINE_SUPPORTS_i8mm
-- Performing Test GGML_MACHINE_SUPPORTS_i8mm - Failed
-- Performing Test GGML_MACHINE_SUPPORTS_sve
-- Performing Test GGML_MACHINE_SUPPORTS_sve - Failed
cc1: error: unknown value 'native+nodotprod+noi8mm+nosve' for '-mcpu'
cc1: note: valid arguments are: cortex-a34 cortex-a35 cortex-a53 cortex-a57 cortex-a72 cortex-a73 thunderx thunderxt88p1 thunderxt88 octeontx octeontx81 octeontx83 thunderxt81 thunderxt83 ampere1 ampere1a emag xgene1 falkor qdf24xx exynos-m1 phecda thunderx2t99p1 vulcan thunderx2t99 cortex-a55 cortex-a75 cortex-a76 cortex-a76ae cortex-a77 cortex-a78 cortex-a78ae cortex-a78c cortex-a65 cortex-a65ae cortex-x1 cortex-x1c neoverse-n1 ares neoverse-e1 octeontx2 octeontx2t98 octeontx2t96 octeontx2t93 octeontx2f95 octeontx2f95n octeontx2f95mm a64fx tsv110 thunderx3t110 neoverse-v1 zeus neoverse-512tvb saphira cortex-a57.cortex-a53 cortex-a72.cortex-a53 cortex-a73.cortex-a35 cortex-a73.cortex-a53 cortex-a75.cortex-a55 cortex-a76.cortex-a55 cortex-r82 cortex-a510 cortex-a710 cortex-a715 cortex-x2 cortex-x3 neoverse-n2 cobalt-100 neoverse-v2 demeter generic
CMake Error at ggml/src/ggml-cpu/CMakeLists.txt:145 (message):
Failed to get ARM features
Call Stack (most recent call first):
ggml/src/CMakeLists.txt:298 (ggml_add_cpu_backend_variant_impl)

-- Configuring incomplete, errors occurred!
@SamuelTallet SamuelTallet changed the title Compile bug: Linux ARM64 CPU build fails Compile bug: Emulated Linux ARM64 CPU build fails Dec 22, 2024
@SamuelTallet
Copy link
Contributor Author

SamuelTallet commented Dec 22, 2024

Issue is related to ARM emulation with QEMU.
I fixed my build pipeline with these CMake parameters -DGGML_NATIVE=OFF
and -DGGML_CPU_ARM_ARCH=armv8-a (because it matches my requirements).

@slaren
Copy link
Collaborator

slaren commented Dec 23, 2024

We should still avoid passing incompatible flags to the compiler with GGML_NATIVE enabled, so let's keep this open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build Compilation issues
Projects
None yet
Development

No branches or pull requests

2 participants