Skip to content

[BUG] SYCL Compilation errors on -DGGML_SYCL=ON with intel/oneapi/compiler/2025.2 #3297

@izelnakri

Description

@izelnakri

Hi there,

First of all, thank you for all your work on this awesome tool. I managed to get this project compile on NixOS with Intel Ultra Series 2 chip(Omnibook Ultra Flip 14") with all the following conditions, however -DGGML_SYCL=ON fails on OneAPI Toolkit 2025.2:

Working targets:

# I can compile with openvino encoder:
cmake -B build -DWHISPER_SDL2=ON -DWHISPER_OPENVINO=1 -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
cmake --build build -j --config Release # works

# I can compile with old -DWHISPER_SYSCL which today gives me warnings and doesnt do SYCL anymore(please update documentation)
cmake -B build -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
cmake --build build -j --config Release # works, but without SYCL

# this one also works, but without SYCL environment as I mentioned, so inference is very slow on my laptop:
cmake -B build -DWHISPER_SDL2=ON -DWHISPER_OPENVINO=1 -DWHISPER_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
cmake --build build -j --config Release # works, but without SYCL

Since I get no SYCL runtime with -DWHISPER_SYCL=ON anymore, I run with -DGGML_SYCL=ON and get these compilation errors:

09:22:33 izelnakri ~/Github/whisper.cpp -> (HEAD detached from v1.7.6) nix develop
warning: Git tree '/home/izelnakri/Github/whisper.cpp' is dirty
🔄 Setting up FHS environment for whisper.cpp development...
🏗️  This will provide a standard Linux environment for Intel compilers

To enter the FHS environment, run:
  whisper-cpp-dev

Or to enter directly:
  whisper-cpp-dev --command bash

🚀 Auto-entering FHS environment...
[setupvars.sh] WARNING: Can not find OpenVINO Python binaries by path /nix/store/pmqp1c9i7vffk1zvjsknlc336qy820jd-openvino-2025.2.0/python
[setupvars.sh] WARNING: OpenVINO Python environment does not set properly
[setupvars.sh] OpenVINO environment initialized

:: initializing oneAPI environment ...
   pqjv2f3g7x0r7m3f2j7y1b1ps4qir1h1-whisper-cpp-dev-init: BASH_VERSION = 5.2.37(1)-release
   args: Using "$@" for setvars.sh arguments: --force
:: advisor -- latest
:: ccl -- latest
:: compiler -- latest
:: dal -- latest
:: debugger -- latest
:: dev-utilities -- latest
:: dnnl -- latest
:: dpcpp-ct -- latest
:: dpl -- latest
:: ipp -- latest
:: ippcp -- latest
:: mkl -- latest
:: mpi -- latest
:: pti -- latest
:: tbb -- latest
:: umf -- latest
:: vtune -- latest
:: oneAPI environment initialized ::

🚀 Entering whisper.cpp development environment with Intel compilers
📍 Intel OneAPI root: /home/izelnakri/intel/oneapi
🔧 CC=icx, CXX=icpx
📦 CMAKE_ARGS=-DWHISPER_SDL2=ON -DWHISPER_OPENVINO=1 -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -DCMAKE_C_FLAGS="--gcc-toolchain=/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0 -B/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0/lib/gcc/x86_64-unknown-linux-gnu/14.3.0 -L/nix/store/l7d6vwajpfvgsd3j4cr25imd1mzb7d1d-gcc-14.3.0-lib/lib -I/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include -I/nix/store/m8m8if29z4g4lh6z1cxpqfrlpi0zmnnv-linux-headers-6.14.7/include" -DCMAKE_CXX_FLAGS="--gcc-toolchain=/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0 -B/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0/lib/gcc/x86_64-unknown-linux-gnu/14.3.0 -L/nix/store/l7d6vwajpfvgsd3j4cr25imd1mzb7d1d-gcc-14.3.0-lib/lib -I/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include -I/nix/store/m8m8if29z4g4lh6z1cxpqfrlpi0zmnnv-linux-headers-6.14.7/include" -DCMAKE_EXE_LINKER_FLAGS="-L/nix/store/l7d6vwajpfvgsd3j4cr25imd1mzb7d1d-gcc-14.3.0-lib/lib -L/nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib"
🔗 GCC toolchain: /nix/store/pbqah1qk4b5y14fqinr1h8zvhqy71v81-gcc-wrapper-14.3.0
📚 Library path: /home/izelnakri/intel/oneapi/tcm/1.4/lib:/home/izelnakri/intel/oneapi/umf/0.11/lib:/home/izelnakri/intel/oneapi/tbb/2022.2/env/../lib/intel64/gcc4.8:/home/izelnakri/intel/oneapi/pti/0.12/lib:/home/izelnakri/intel/oneapi/mpi/2021.16/lib:/home/izelnakri/intel/oneapi/mkl/2025.2/lib:/home/izelnakri/intel/oneapi/ippcp/2025.2/lib/:/home/izelnakri/intel/oneapi/ipp/2022.2/lib:/home/izelnakri/intel/oneapi/dnnl/2025.2/lib:/home/izelnakri/intel/oneapi/dal/2025.6/lib:/home/izelnakri/intel/oneapi/compiler/2025.2/lib:/home/izelnakri/intel/oneapi/ccl/2021.16/lib/:/nix/store/l7d6vwajpfvgsd3j4cr25imd1mzb7d1d-gcc-14.3.0-lib/lib:/nix/store/q4wq65gl3r8fy746v9bbwgx4gzn0r2kl-glibc-2.40-66/lib:/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/lib:
📁 Include path: /home/izelnakri/intel/oneapi/umf/0.11/include:/home/izelnakri/intel/oneapi/mkl/2025.2/include:/home/izelnakri/intel/oneapi/dnnl/2025.2/include:/home/izelnakri/intel/oneapi/dev-utilities/2025.2/include:/home/izelnakri/intel/oneapi/ccl/2021.16/include:/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include:/nix/store/m8m8if29z4g4lh6z1cxpqfrlpi0zmnnv-linux-headers-6.14.7/include
✅ Intel C compiler (icx) found: /home/izelnakri/intel/oneapi/compiler/2025.2/bin/icx
   Version: Intel(R) oneAPI DPC++/C++ Compiler 2025.2.0 (2025.2.0.20250605)
✅ Intel C++ compiler (icpx) found: /home/izelnakri/intel/oneapi/compiler/2025.2/bin/icpx
   Version: Intel(R) oneAPI DPC++/C++ Compiler 2025.2.0 (2025.2.0.20250605)
📚 Available functions: build_whisper, build_whisper_debug, clean_build, test_compiler, test_headers, test_gcc_toolchain
💡 Run 'test_gcc_toolchain' to check GCC toolchain detection
💡 Run 'test_compiler' first to verify Intel compiler setup
💡 Run 'test_headers' to check header file accessibility
💡 Run 'build_whisper' to compile whisper.cpp with SYCL and OpenVINO
🧪 Testing Intel compiler setup...
=== Checking for critical files ===
Looking for stdlib.h:
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/bits/stdlib.h
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/stdlib.h
Looking for crtbegin.o:
/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0/lib/gcc/x86_64-unknown-linux-gnu/14.3.0/crtbegin.o

=== Testing simple compilation ===
Testing icx with simple program...
Compiling with flags: --gcc-toolchain=/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0 -B/nix/store/sa7j7cddyblhcb3ch3ds10w7nw75yjj1-gcc-14.3.0/lib/gcc/x86_64-unknown-linux-gnu/14.3.0 -L/nix/store/l7d6vwajpfvgsd3j4cr25imd1mzb7d1d-gcc-14.3.0-lib/lib -I/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include -I/nix/store/m8m8if29z4g4lh6z1cxpqfrlpi0zmnnv-linux-headers-6.14.7/include
✅ Simple C compilation successful
Hello World\n
[izelnakri@omnibook:~/Github/whisper.cpp]$ rm -rf build

[izelnakri@omnibook:~/Github/whisper.cpp]$ cmake -B build -DWHISPER_SDL2=ON -DWHISPER_OPENVINO=1 -DGGML_SYCL=ON -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The C compiler identification is IntelLLVM 2025.2.0
-- The CXX compiler identification is IntelLLVM 2025.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/izelnakri/intel/oneapi/compiler/2025.2/bin/icx - 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: /home/izelnakri/intel/oneapi/compiler/2025.2/bin/icpx - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.49.0")
-- Setting GGML_NATIVE_DEFAULT to OFF
-- 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: x86_64
-- GGML_SYSTEM_ARCH: x86
-- Including CPU backend
-- Found OpenMP_C: -fiopenmp (found version "5.1")
-- Found OpenMP_CXX: -fiopenmp (found version "5.1")
-- Found OpenMP: TRUE (found version "5.1")
-- x86 detected
-- Adding CPU backend variant ggml-cpu:
-- GGML_SYCL_TARGET=INTEL
-- Performing Test SUPPORTS_SYCL
-- Performing Test SUPPORTS_SYCL - Success
-- Using oneAPI Release SYCL compiler (icpx).
-- SYCL found
-- SYCL Compiler version: 20250200
-- SYCL_INCLUDE_DIR: /home/izelnakri/intel/oneapi/compiler/2025.2/include
-- SYCL_LIBRARY=/home/izelnakri/intel/oneapi/compiler/2025.2/lib/libsycl.so
-- Found IntelSYCL: /home/izelnakri/intel/oneapi/compiler/2025.2/include (found version "202012")
-- Found oneDNN: /home/izelnakri/intel/oneapi/dnnl/2025.2/lib/libdnnl.so.3.8
-- MKL_VERSION: 2025.2.0
-- MKL_ROOT: /home/izelnakri/intel/oneapi/mkl/2025.2
-- MKL_ARCH: intel64
-- MKL_SYCL_LINK: None, set to ` dynamic` by default
-- MKL_LINK: None, set to ` dynamic` by default
-- MKL_SYCL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
-- MKL_INTERFACE_FULL: None, set to ` intel_ilp64` by default
-- MKL_SYCL_THREADING: None, set to ` tbb_thread` by default
-- MKL_THREADING: None, set to ` intel_thread` by default
-- MKL_SYCL_MPI: None, set to ` intelmpi` by default
-- MKL_MPI: None, set to ` intelmpi` by default
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_scalapack_ilp64.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_cdft_core.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_intel_ilp64.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_intel_thread.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_core.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_blacs_intelmpi_ilp64.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_distributed_dft.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_blas.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_lapack.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_dft.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_sparse.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_data_fitting.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_rng.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_stats.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_sycl_vm.so
-- Found /home/izelnakri/intel/oneapi/mkl/2025.2/lib/libmkl_tbb_thread.so
-- Found /home/izelnakri/intel/oneapi/compiler/2025.2/lib/libiomp5.so
-- Including SYCL backend
-- SDL2_INCLUDE_DIRS = /nix/store/vifmg9yvzqjkhy5yq520qsw2swn5279b-sdl2-compat-2.32.56-dev/include;/nix/store/vifmg9yvzqjkhy5yq520qsw2swn5279b-sdl2-compat-2.32.56-dev/include/SDL2;/nix/store/vifmg9yvzqjkhy5yq520qsw2swn5279b-sdl2-compat-2.32.56-dev/include/SDL2;/nix/store/vifmg9yvzqjkhy5yq520qsw2swn5279b-sdl2-compat-2.32.56-dev/include/SDL2
-- SDL2_LIBRARIES    = SDL2::SDL2main;SDL2::SDL2
-- Configuring done (4.5s)
-- Generating done (0.1s)
-- Build files have been written to: /home/izelnakri/Github/whisper.cpp/build

[izelnakri@omnibook:~/Github/whisper.cpp]$ cmake --build build -j --config Release
[  2%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml.c.o
[  2%] Building CXX object examples/deprecation-warning/CMakeFiles/stream.dir/deprecation-warning.cpp.o
[  3%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-alloc.c.o
[  3%] Building CXX object examples/deprecation-warning/CMakeFiles/main.dir/deprecation-warning.cpp.o
[  4%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-backend.cpp.o
[  5%] Building C object ggml/src/CMakeFiles/ggml-base.dir/ggml-quants.c.o
[  6%] Building CXX object examples/deprecation-warning/CMakeFiles/command.dir/deprecation-warning.cpp.o
[  6%] Building CXX object examples/deprecation-warning/CMakeFiles/bench.dir/deprecation-warning.cpp.o
[  7%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml.cpp.o
[  7%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-opt.cpp.o
[  8%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/ggml-threading.cpp.o
[  9%] Building CXX object ggml/src/CMakeFiles/ggml-base.dir/gguf.cpp.o
[ 10%] Building CXX object examples/CMakeFiles/common-sdl.dir/common-sdl.cpp.o
[ 11%] Linking CXX executable ../../bin/command
[ 12%] Linking CXX executable ../../bin/bench
[ 13%] Linking CXX executable ../../bin/main
[ 14%] Linking CXX executable ../../bin/stream
[ 14%] Built target command
[ 14%] Built target stream
[ 14%] Built target main
[ 14%] Built target bench
[ 15%] Linking CXX static library libcommon-sdl.a
[ 15%] Built target common-sdl
[ 16%] Linking CXX shared library libggml-base.so
[ 16%] Built target ggml-base
[ 17%] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.c.o
[ 18%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/repack.cpp.o
[ 19%] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/quants.c.o
[ 20%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/hbm.cpp.o
[ 21%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/traits.cpp.o
[ 21%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ggml-cpu.cpp.o
[ 22%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/common.cpp.o
[ 22%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/amx.cpp.o
[ 23%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/conv.cpp.o
[ 24%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/cpy.cpp.o
[ 26%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/ggml-sycl.cpp.o
[ 27%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/unary-ops.cpp.o
[ 27%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/amx/mmq.cpp.o
[ 28%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/binbcast.cpp.o
[ 28%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/concat.cpp.o
[ 29%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/convert.cpp.o
[ 30%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/element_wise.cpp.o
[ 31%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/getrows.cpp.o
[ 31%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/mmvq.cpp.o
[ 34%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/outprod.cpp.o
[ 32%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/arch/x86/repack.cpp.o
[ 33%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/binary-ops.cpp.o
[ 33%] Building C object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/arch/x86/quants.c.o
[ 35%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/mmq.cpp.o
[ 36%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/softmax.cpp.o
[ 37%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/im2col.cpp.o
[ 38%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/ops.cpp.o
[ 40%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/gla.cpp.o
[ 40%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/dmmv.cpp.o
[ 41%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/tsembd.cpp.o
[ 43%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/rope.cpp.o
[ 44%] Building CXX object ggml/src/CMakeFiles/ggml-cpu.dir/ggml-cpu/vec.cpp.o
[ 43%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/sycl_hw.cpp.o
[ 44%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/norm.cpp.o
[ 44%] Building CXX object ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/wkv.cpp.o
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: too few arguments provided to function-like macro invocation
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:103:39: note: expanded from macro 'BUILTIN_REL'
  103 |   bool NAME(NUM_ARGS##_TYPE_ARG(float)) { return SPIRV_IMPL(NUM_ARGS##_ARG); } \
      |                                       ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1306:11: note: macro 'isgreater' defined here
 1306 | #  define isgreater(x, y)       __builtin_isgreater(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected expression
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:103:43: note: expanded from macro 'BUILTIN_REL'
  103 |   bool NAME(NUM_ARGS##_TYPE_ARG(float)) { return SPIRV_IMPL(NUM_ARGS##_ARG); } \
      |                                           ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected ';' after top level declarator
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:104:3: note: expanded from macro 'BUILTIN_REL'
  104 |   bool NAME(NUM_ARGS##_TYPE_ARG(double)) {                                     \
      |   ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: too few arguments provided to function-like macro invocation
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:104:40: note: expanded from macro 'BUILTIN_REL'
  104 |   bool NAME(NUM_ARGS##_TYPE_ARG(double)) {                                     \
      |                                        ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1306:11: note: macro 'isgreater' defined here
 1306 | #  define isgreater(x, y)       __builtin_isgreater(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:23: error: redefinition of 'isgreater'
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      |                       ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:23: note: previous definition is here
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected expression
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:105:5: note: expanded from macro 'BUILTIN_REL'
  105 |     return SPIRV_IMPL(NUM_ARGS##_ARG);                                         \
      |     ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected ';' after top level declarator
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:107:3: note: expanded from macro 'BUILTIN_REL'
  107 |   bool NAME(NUM_ARGS##_TYPE_ARG(half)) {                                       \
      |   ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: too few arguments provided to function-like macro invocation
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:107:38: note: expanded from macro 'BUILTIN_REL'
  107 |   bool NAME(NUM_ARGS##_TYPE_ARG(half)) {                                       \
      |                                      ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1306:11: note: macro 'isgreater' defined here
 1306 | #  define isgreater(x, y)       __builtin_isgreater(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:23: error: redefinition of 'isgreater'
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      |                       ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:23: note: previous definition is here
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected expression
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:108:5: note: expanded from macro 'BUILTIN_REL'
  108 |     return SPIRV_IMPL(NUM_ARGS##_CONVERTED_ARG);                               \
      |     ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: expected ';' after top level declarator
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:110:3: note: expanded from macro 'BUILTIN_REL'
  110 |   template <NUM_ARGS##_TYPENAME_TYPE>                                          \
      |   ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: too few arguments provided to function-like macro invocation
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:112:35: note: expanded from macro 'BUILTIN_REL'
  112 |       NUM_ARGS##_TEMPLATE_TYPE_ARG) {                                          \
      |                                   ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1306:11: note: macro 'isgreater' defined here
 1306 | #  define isgreater(x, y)       __builtin_isgreater(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:132:1: error: too few arguments provided to function-like macro invocation
  132 | BUILTIN_REL(TWO_ARGS, isgreater, __spirv_FOrdGreaterThan)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:115:64: note: expanded from macro 'BUILTIN_REL'
  115 |           [&](NUM_ARGS##_AUTO_ARG) { return NAME(NUM_ARGS##_ARG); },           \
      |                                                                ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1306:11: note: macro 'isgreater' defined here
 1306 | #  define isgreater(x, y)       __builtin_isgreater(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:1: error: too few arguments provided to function-like macro invocation
  133 | BUILTIN_REL(TWO_ARGS, isgreaterequal, __spirv_FOrdGreaterThanEqual)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:103:39: note: expanded from macro 'BUILTIN_REL'
  103 |   bool NAME(NUM_ARGS##_TYPE_ARG(float)) { return SPIRV_IMPL(NUM_ARGS##_ARG); } \
      |                                       ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1307:11: note: macro 'isgreaterequal' defined here
 1307 | #  define isgreaterequal(x, y)  __builtin_isgreaterequal(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:1: error: expected expression
  133 | BUILTIN_REL(TWO_ARGS, isgreaterequal, __spirv_FOrdGreaterThanEqual)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:103:43: note: expanded from macro 'BUILTIN_REL'
  103 |   bool NAME(NUM_ARGS##_TYPE_ARG(float)) { return SPIRV_IMPL(NUM_ARGS##_ARG); } \
      |                                           ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:1: error: expected ';' after top level declarator
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:104:3: note: expanded from macro 'BUILTIN_REL'
  104 |   bool NAME(NUM_ARGS##_TYPE_ARG(double)) {                                     \
      |   ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:1: error: too few arguments provided to function-like macro invocation
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:104:40: note: expanded from macro 'BUILTIN_REL'
  104 |   bool NAME(NUM_ARGS##_TYPE_ARG(double)) {                                     \
      |                                        ^
/nix/store/x4cz3spvw0bwwz5sjsdn2qm4f89rcryn-glibc-2.40-66-dev/include/math.h:1307:11: note: macro 'isgreaterequal' defined here
 1307 | #  define isgreaterequal(x, y)  __builtin_isgreaterequal(x, y)
      |           ^
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/getrows.cpp:14:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/common.hpp:21:
In file included from /home/izelnakri/Github/whisper.cpp/ggml/src/ggml-sycl/dpct/helper.hpp:17:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/sycl.hpp:30:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/atomic_fence.hpp:14:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/spirv.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/experimental/non_uniform_groups.hpp:11:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/ext/oneapi/sub_group_mask.hpp:10:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/builtins.hpp:27:
In file included from /home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/builtins.hpp:321:
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:23: error: redefinition of 'isgreaterequal'
  133 | BUILTIN_REL(TWO_ARGS, isgreaterequal, __spirv_FOrdGreaterThanEqual)
      |                       ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:23: note: previous definition is here
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:133:1: error: expected expression
  133 | BUILTIN_REL(TWO_ARGS, isgreaterequal, __spirv_FOrdGreaterThanEqual)
      | ^
/home/izelnakri/intel/oneapi/compiler/2025.2/include/sycl/detail/builtins/relational_functions.inc:105:5: note: expanded from macro 'BUILTIN_REL'
  105 |     return SPIRV_IMPL(NUM_ARGS##_ARG);                                         \
      |     ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/build.make:205: ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/getrows.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 45%] Linking CXX shared library libggml-cpu.so
[ 45%] Built target ggml-cpu
make[1]: *** [CMakeFiles/Makefile2:1602: ggml/src/ggml-sycl/CMakeFiles/ggml-sycl.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
  • Is there anyway today to surpress these compile time errors with a flag or a change in cmake?

  • Effectively SYCL today seems incompatible with Intel OneAPI Toolkit 2025.2, which version would be compatible?

  • We need to update the documentation with -DGGML_SYCL=ON instead of -DWHISPER_SYCL=ON.

I can share my very advanced flake.nix on demand, if there is any interest. Basically since OneAPI Toolkit is NOT on nixpkgs I download and compiled that manually but everything else is sourced from my custom flake.nix that probably has many cruft that can be removed once I can get this to compile properly: https://gist.github.com/izelnakri/0bc950338081d9177467757d98158e19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions