Repository navigation
Adding missing features of CMakeLists.txt & Refactoring - #131
Merged
Merged
Conversation
Refactoring: 1. Simplify more options that are negation of negation. LLAMA_NO_ACCELERATE -> LLAMA_ACCELERATE 2. Changed to an optional expression instead of forcing to enable AVX2 in MSVC. 3. Make CMAKE_CXX_STANDARD, which is different from Makefile, the same. 4. Use add_compile_options instead of adding options to CMAKE_C_FLAGS. 5. Make utils use target_link_libraries instead of directly referencing code. Added features: 1. Added some options. LLAMA_STATIC_LINK,LLAMA_NATIVE,LLAMA_LTO,LLAMA_GPROF,LLAMA_OPENBLAS
ggerganov
marked this pull request as ready for review
March 19, 2023 17:52
ggerganov
approved these changes
Mar 19, 2023
Member
|
Someone figure out with the Windows build is failing and merge |
Contributor
Author
|
LLAMA_LTO was changed so that it can be used outside of Release so that it can be built on Windows. |
Green-Sky
suggested changes
Mar 20, 2023
Green-Sky
reviewed
Mar 20, 2023
Green-Sky
left a comment
Collaborator
There was a problem hiding this comment.
@ggerganov should we upgrade form cmake 3.9 to 3.12 ?
Green-Sky
self-requested a review
March 21, 2023 00:14
Green-Sky
approved these changes
Mar 21, 2023
Contributor
|
What is the reasoning for changing C++11 standard to C++17 since the project does not use any of C++17 extensions? To my knowledge all compiler versions which support C++17 also support C++11, but not vice-versa. |
Collaborator
rooprob
pushed a commit
to rooprob/llama.cpp
that referenced
this pull request
Aug 2, 2023
readme: Include reference to go port
Seunghhon
pushed a commit
to Seunghhon/llama.cpp
that referenced
this pull request
Apr 26, 2026
* Functionality addition CMakeLists.txt Refactoring: 1. Simplify more options that are negation of negation. LLAMA_NO_ACCELERATE -> LLAMA_ACCELERATE 2. Changed to an optional expression instead of forcing to enable AVX2 in MSVC. 3. Make CMAKE_CXX_STANDARD, which is different from Makefile, the same. 4. Use add_compile_options instead of adding options to CMAKE_C_FLAGS. 5. Make utils use target_link_libraries instead of directly referencing code. Added features: 1. Added some options. LLAMA_STATIC_LINK,LLAMA_NATIVE,LLAMA_LTO,LLAMA_GPROF,LLAMA_OPENBLAS * Fix Accelerate link in CMake * Windows build Fix * C++11 to C++17 * Reflects C/C++ standard individually * Change the version to 3.12 --------- Co-authored-by: Georgi Gerganov <[email protected]>
phuongncn
pushed a commit
to phuongncn/llama.cpp-gx10-dgx-sparks-deepseekv4
that referenced
this pull request
Apr 28, 2026
* iq4_k_r4: slightly faster on Zen4 * iq4_xs_r4: very slightly faster Zen4 --------- Co-authored-by: Iwan Kawrakow <[email protected]>
ljubomirj
pushed a commit
to ljubomirj/llama.cpp
that referenced
this pull request
May 6, 2026
* Functionality addition CMakeLists.txt Refactoring: 1. Simplify more options that are negation of negation. LLAMA_NO_ACCELERATE -> LLAMA_ACCELERATE 2. Changed to an optional expression instead of forcing to enable AVX2 in MSVC. 3. Make CMAKE_CXX_STANDARD, which is different from Makefile, the same. 4. Use add_compile_options instead of adding options to CMAKE_C_FLAGS. 5. Make utils use target_link_libraries instead of directly referencing code. Added features: 1. Added some options. LLAMA_STATIC_LINK,LLAMA_NATIVE,LLAMA_LTO,LLAMA_GPROF,LLAMA_OPENBLAS * Fix Accelerate link in CMake * Windows build Fix * C++11 to C++17 * Reflects C/C++ standard individually * Change the version to 3.12 --------- Co-authored-by: Georgi Gerganov <[email protected]>
gaetan-puleo
added a commit
to Nathanw1014/llama.cpp
that referenced
this pull request
Oct 3, 2026
…p-master hip: lower the MMB gate to 32 rows for qwen4exp contexts
gaetan-puleo
pushed a commit
to Nathanw1014/llama.cpp
that referenced
this pull request
Oct 3, 2026
Master now contains ggml-org#131, which makes mmb_min_t take the backend context. One conflict in mmb.cu: this branch had moved that check into ggml_cuda_hc_gate_mix_supported. The helper now takes the context and both callers (ggml_cuda_hc_gate_mix, ggml_cuda_hc_gate_mix_route) pass it, so the BF16-only marking and the kernel keep one shared check. Assisted-by: Claude
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 23, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 23, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 23, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 24, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 25, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 26, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 26, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 26, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 27, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 28, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 28, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Oct 31, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Nov 1, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/. Fold (r195): a cell that find_slot moves keeps its rollback snapshot planes. build_rs relocates the "extra states" (the cells inside [head, head+n_rs) that no sequence of this ubatch uses) by copying plane 0 only, so a moved cell's planes 1..n_rs_seq stay at the old index, where the cells that take their place overwrite them -- and that sequence's next rollback then reads another sequence's snapshot (or zeroed rows). From 3 cells on, find_slot's gather-and-reorder moves a live cell whenever a multi-sequence ubatch's cell range spans a third cell, so a 3- or 4-slot server with speculative decoding hits it. build_rs now also copies planes 1..n_rs_seq of the extra states, gathered through a new input `s_copy_extra` before this ubatch writes its snapshots; the source ids use `s_src()`, not `s_copy()`, because `s_copy()` consumes the sequence's pending rollback index. Where no extra state exists (n_rs == n_seqs, i.e. every single-sequence batch and a 2-cell cache) the graph does not change. The defect is upstream's (6050b46 and master 0ec4027 carry the same build_rs); both copies are in upstream/recurrent-moved-cell-snapshots/. Contribution by overdoingism (PR ggml-org#261). Record: archive/work/recurrent-moved-cell-snapshots/.
stew675
pushed a commit
to stew675/llama.cpp
that referenced
this pull request
Nov 5, 2026
Sources: old 02 (whole block). Fold (r91): fold every ubatch into the per-sequence rollback tracker (issue ggml-org#131). `prepare()` recorded each sequence's last-batch shape from `ubatches.back()` only, so a sequence that ran in a non-final ubatch of a multi-ubatch call kept an older count -- typically its own prefill chunk. The guard then compared a rejection rollback against a completed prefill and warned about a batch boundary that never happened (observed 4571-token case, reproduced on gfx1201: 1 warning -> 0 with this fix). Every ubatch is now folded in, oldest first. Also adds the `LLAMA_RS_ROLLBACK_DEBUG` RSPREP/RSROLL instrumentation that proved it. Text-identical pre/post on gfx1151 and gfx1201. Record: archive/work/rs-rollback-boundary/. Fold (r195): a cell that find_slot moves keeps its rollback snapshot planes. build_rs relocates the "extra states" (the cells inside [head, head+n_rs) that no sequence of this ubatch uses) by copying plane 0 only, so a moved cell's planes 1..n_rs_seq stay at the old index, where the cells that take their place overwrite them -- and that sequence's next rollback then reads another sequence's snapshot (or zeroed rows). From 3 cells on, find_slot's gather-and-reorder moves a live cell whenever a multi-sequence ubatch's cell range spans a third cell, so a 3- or 4-slot server with speculative decoding hits it. build_rs now also copies planes 1..n_rs_seq of the extra states, gathered through a new input `s_copy_extra` before this ubatch writes its snapshots; the source ids use `s_src()`, not `s_copy()`, because `s_copy()` consumes the sequence's pending rollback index. Where no extra state exists (n_rs == n_seqs, i.e. every single-sequence batch and a 2-cell cache) the graph does not change. The defect is upstream's (6050b46 and master 0ec4027 carry the same build_rs); both copies are in upstream/recurrent-moved-cell-snapshots/. Contribution by overdoingism (PR ggml-org#261). Record: archive/work/recurrent-moved-cell-snapshots/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We have come up with several changes to CMakeLists.txt that are expected to improve performance, compatibility, and maintainability, and we have drafted them.
Change list :
Change LLAMA_NO_ACCELERATE to LLAMA_ACCELERATE to avoid "NOT NO" in if statements.
I see no reason to make it Apple-only. It should be possible to enable/disable on all platforms.
Use "add_compile_options" instead of writing directly to CMAKE_C_FLAGS to avoid double flags and compile errors due to typos.
LLAMA_STATIC_LINK, LLAMA_NATIVE, and LLAMA_LTO were added.
LLAMA_STATIC_LINK is an option to enable static linking. This will be useful when compiling for Windows with MinGW and for future distribution.
Also, LLAMA_NATIVE to add -march=native and LLAMA_LTO for link-time optimization will both be useful options for this project for speed.
cmake_minimum_required was changed to 3.9 for LTO support.
CMAKE_CXX_STANDARD was changed to c++11, the same as in the Makefile.
I made utils build using add_library and link to it.
Added Threads link since it was missing.
Added option LLAMA_OPENBLAS. (Not tested).
We have confirmed that it works on MSVC, MSVC Clang GUN like (not clang-cl), MinGW, and Cygwin on Windows, but have not confirmed that it works on other platforms.
Also, prioritizing CMake's features may sometimes sacrifice simplicity.
P.S. Sorry if there is any strange English. This is using automatic translation.