Skip to content

ggml-cuda: fix regex for arch list#18371

Merged
am17an merged 2 commits intoggml-org:masterfrom
am17an:cuda-cmake-fix-regex
Dec 25, 2025
Merged

ggml-cuda: fix regex for arch list#18371
am17an merged 2 commits intoggml-org:masterfrom
am17an:cuda-cmake-fix-regex

Conversation

@am17an
Copy link
Contributor

@am17an am17an commented Dec 25, 2025

@Panchovix
Copy link

Hello! With native, I get

cmake -B lenux \
  -DGGML_CUDA=ON \
  -DGGML_CUDA_FA_ALL_QUANTS=ON \
  -DGGML_BLAS=OFF \
  -DGGML_RPC=ON \
  -DGGML_MAX_CONTEXTS=2048 \
  -DGGML_SCHED_MAX_COPIES=1 \

cmake --build lenux --config Release -j 11
-- The C compiler identification is GNU 15.2.1
-- The CXX compiler identification is GNU 15.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib64/ccache/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/lib64/ccache/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMAKE_BUILD_TYPE=Release
-- Found Git: /usr/bin/git (found version "2.52.0")
-- The ASM compiler identification is GNU
-- Found assembler: /usr/lib64/ccache/cc
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.
-- CMAKE_SYSTEM_PROCESSOR: x86_64
-- GGML_SYSTEM_ARCH: x86
-- 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")
-- x86 detected
-- Adding CPU backend variant ggml-cpu: -march=native
CMake Error at ggml/src/ggml-cuda/CMakeLists.txt:53:
  Parse error.  Expected a command name, got unquoted argument with text "^".


-- Configuring incomplete, errors occurred!
gmake: Makefile: No such file or directory
gmake: *** No rule to make target 'Makefile'.  Stop.

With -DCMAKE_CUDA_ARCHITECTURES="86;89;120", I get the same error:

I edited it like this

imagen

@github-actions github-actions bot added Nvidia GPU Issues specific to Nvidia GPUs ggml changes relating to the ggml tensor library for machine learning labels Dec 25, 2025
@am17an
Copy link
Contributor Author

am17an commented Dec 25, 2025

@Panchovix not sure why there's an '^' at the end of if statement, copy-paste error?

@Panchovix
Copy link

Panchovix commented Dec 25, 2025

@am17an oof my bad!

Now with the corrected regex, I can build with either native (not setting a CUDA arch), DCMAKE_CUDA_ARCHITECTURES native and DCMAKE_CUDA_ARCHITECTURES 86;89;120.

I assume either of these 3 will include mxfp4 support?

@am17an am17an marked this pull request as ready for review December 25, 2025 17:31
@am17an am17an merged commit 85c40c9 into ggml-org:master Dec 25, 2025
67 of 68 checks passed
@am17an am17an deleted the cuda-cmake-fix-regex branch December 25, 2025 17:35
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
* ggml-cuda: fix regex for arch list

* make regex exact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Nvidia GPU Issues specific to Nvidia GPUs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants