Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Compile bug: error: call to undeclared function '_mm512_storeu_si512'; in ggml.c (icx/clang in MSVC compat mode)

Closed Beginner friendly
#31,290 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
c, cmake, cpp
Domain
build-system

Research direction

Start with the AVX512BF16 conditional in ggml/src/ggml.c around the reported intrinsic declarations and compare how compiler modes include immintrin.h. Reproduce the Windows IntelLLVM clang-cl build using the supplied flags, then check the BF16 conversion path. Done when the build succeeds in MSVC-compatible clang mode and the existing supported compiler paths remain valid.

Written by the indexing model from the issue text.

Description

bug-unconfirmed
Git commit

3cf03257f219afbe7334045ff7c6a06ac68c627d

Operating systems

Windows

GGML backends

SYCL

Problem description & steps to reproduce

I'm trying to compile Strata using -march=znver4 on a Zen 4 CPU (Ryzen 7600). It has this project as a dependency, currently using the specified pinned revision.

The issue is BF16 support (AVX512BF16) while icx/clang is running in MSVC-compatible modes. In this case the following code fails because _MSC_VER is set but the relevant intrinsic isn't defined:

// Needed for ggml_fp32_to_bf16_row()
#if defined(__AVX512BF16__)
#if defined(_MSC_VER)
#define m512i(p) p
#else
#include <immintrin.h>
#define m512i(p) (__m512i)(p)
#endif // defined(_MSC_VER)
#endif // defined(__AVX512BF16__)

You might need something like #if defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) instead.

First Bad Commit

No response

Compile command
cmake -B build-sycl -S . -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTRATA_ENABLE_SYCL=ON -DSTRATA_SYCL_AOT=bmg-g21 -DSTRATA_SYCL_PARITY=OFF -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_CXX_FLAGS="/EHsc -Qunused-arguments -Qmkl=sequential /clang:-O3 /clang:-march=znver4" -DCMAKE_C_FLAGS="-Qunused-arguments -Qmkl=sequential /clang:-O3 /clang:-march=znver4" -DCMAKE_EXE_LINKER_FLAGS="-Qmkl=sequential"

cmake --build build-sycl --target strata

With /clang:-mno-avx512bf16 or /clang:-includeimmintrin.h set in -DCMAKE_CXX_FLAGS and -DCMAKE_C_FLAGS, the error does not occur.

Relevant log output
-- The CXX compiler identification is IntelLLVM 2026.1.0 with MSVC-like command-line
-- Check for working C compiler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe - skipped
-- The ASM compiler identification is IntelLLVM
-- Found assembler: C:/Program Files (x86)/Intel/oneAPI/compiler/latest/bin/icx.exe
-- Adding CPU backend variant ggml-cpu: /arch:AVX512 GGML_AVX512
-- ggml version: 0.24.0
-- ggml commit:  3cf03257f

[1/134] Building C object ggml\src\CMakeFiles\ggml-base.dir\ggml.c.obj
FAILED: [code=1] ggml/src/CMakeFiles/ggml-base.dir/ggml.c.obj
C:\PROGRA~2\Intel\oneAPI\compiler\latest\bin\icx.exe  /nologo -DGGML_SCHED_MAX_COPIES=4 -DSTRATA_Q6K_EXPERTS=1 -DSTRATA_VERSION=\"0.1.49.2\" -DSTRATA_XMX_SG16=1 -D_CRT_SECURE_NO_WARNINGS -D_XOPEN_SOURCE=600 -IC:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\. -IC:\Users\GreenReaper\strata\build-sycl\ggml\src -IC:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\..\include -Qunused-arguments -Qmkl=sequential /clang:-O3 /clang:-march=znver4 /O2 /Ob2 /DNDEBUG -Qstd:c11 -MD -fp-model=precise -Wno-unused-parameter -Wno-unused-variable -Wno-deprecated-declarations /wd4005 /wd4244 /wd4267 /wd4305 /wd4566 /wd4996 /wd4702 /utf-8 -QMD -QMT ggml\src\CMakeFiles\ggml-base.dir\ggml.c.obj -QMF ggml\src\CMakeFiles\ggml-base.dir\ggml.c.obj.d /Foggml\src\CMakeFiles\ggml-base.dir\ggml.c.obj /Fdggml\src\CMakeFiles\ggml-base.dir\ggml-base.pdb -c C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c
icx: warning: unknown argument ignored in clang-cl: '-fp-model=precise' [-Wunknown-argument]
C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c(500,9): error: call to undeclared function '_mm512_storeu_si512'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  500 |         _mm512_storeu_si512(
      |         ^
C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c(501,14): error: use of undeclared identifier '__m512i'
  501 |             (__m512i *)(y + i),
      |              ^~~~~~~
C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c(501,23): error: expected expression
  501 |             (__m512i *)(y + i),
      |                       ^
C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c(502,19): error: call to undeclared function '_mm512_cvtne2ps_pbh'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  502 |             m512i(_mm512_cvtne2ps_pbh(_mm512_loadu_ps(x + i + 16),
      |                   ^
C:\Users\GreenReaper\strata\build-sycl\_deps\strata_llamacpp-src\ggml\src\ggml.c(502,39): error: call to undeclared function '_mm512_loadu_ps'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  502 |             m512i(_mm512_cvtne2ps_pbh(_mm512_loadu_ps(x + i + 16),
      |                                       ^
5 errors generated.
Dominant language
C++
Stars
133k
Forks
24.9k
Avg merge
1d 21h
Merged PRs (30d)
486

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ggml-org/llama.cpp

All issues in ggml-org/llama.cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.