ik_llama_opt/tests
Guy Barel 64109a4d60
vulkan : add IQ4_KS and IQ4_KT support (#2332)
* vulkan : use ggml_row_size for types with a per-row scale

Types that declare a row_meta_size store a per-row scale ahead of the row's
blocks, so a row is not ggml_type_size()*ne/ggml_blck_size() bytes. This
under-sized src0 in the four quantized mat-mul paths, and made
ggml_vk_dim01_contiguous() report such a tensor non-contiguous, which in turn
made supports_op reject it. No change for row_meta_size == 0.

* vulkan : add IQ4_KS and IQ4_KT support

A row of these types is one f32 scale followed by the row's blocks, so rows are
not a whole number of blocks apart and the usual block-indexed addressing does
not work. They are read through a uint32_t alias of binding 0 and addressed by
word; types.comp holds the alias, the stride and the decode, so each shader only
expresses its own addressing and no push constant layouts change.

Covers to_fp16, get_rows, mul_mat_vec (incl. MUL_MAT_ID) and scalar + coopmat1
mul_mm. get_rows addresses by row rather than through nb01/02/03, which cannot
express a per-row scale, so supports_op accepts only a contiguous src0 for these
two types. coopmat2 is excluded because coopMatLoadTensorNV addresses through a
uniform grid tensor layout, which cannot describe the row prefix; the two
mat-mat getters return nullptr there and the callers fall back to F16.

* tests : add IQ4_KS/IQ4_KT decode validation

Re-implements in C++ the indexing each of the four shader families uses and
diffs it against ggml's to_float over several row and block counts. CPU only: it
validates the format transcription, not the compiled shaders.
2026-08-24 18:20:35 +02:00
..
peg-parser Autoparser - complete refactoring of parser architecture (#1376) 2026-04-22 10:04:13 +02:00
.gitignore common : introduce composable PEG parser combinators for chat parsing and new jinja template engine (#1369) 2026-03-09 11:03:33 +01:00
CMakeLists.txt vulkan : add IQ4_KS and IQ4_KT support (#2332) 2026-08-24 18:20:35 +02:00
get-model.cpp ci : add model tests + script wrapper (#4586) 2024-01-26 14:18:00 +02:00
get-model.h ci : add model tests + script wrapper (#4586) 2024-01-26 14:18:00 +02:00
run-json-schema-to-grammar.mjs json-schema-to-grammar improvements (+ added to server) (#5978) 2024-03-21 11:50:43 +00:00
test-autorelease.cpp spec : add self speculative decoding, ngram and refactor (#1261) 2026-02-13 19:04:55 +01:00
test-backend-ops.cpp CUDA: fix MUL with non-contiguous src0 and scalar src1 (#2072) 2026-07-03 08:27:03 +02:00
test-c.c Remove deprecated Kompute (Vulkan compute) backend (#2097) 2026-07-08 10:01:01 +02:00
test-chat-auto-parser.cpp fix: MiniMax-M3 streaming parser when tool calls start before `</mm:think>` (#2085) 2026-07-09 18:12:47 +03:00
test-chat-peg-parser.cpp Autoparser - complete refactoring of parser architecture (#1376) 2026-04-22 10:04:13 +02:00
test-chat-template.cpp fix: MiniMax-M3 streaming parser when tool calls start before `</mm:think>` (#2085) 2026-07-09 18:12:47 +03:00
test-chat.cpp Chores : Typos fixing round 3 (project wide, ggml dir included, comments and user facing msg only) (#2249) 2026-08-04 07:15:28 +03:00
test-double-float.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-function-calls.cpp Fix for Deepseek r1 parsing (#676) 2025-08-08 13:56:44 +03:00
test-grad0.cpp ggml : refactor rope norm/neox (#7634) 2024-06-05 11:29:20 +03:00
test-grammar-integration.cpp common/grammar: fix grammar parsing issues to prevent stack overflow and hangs (#1822) 2026-05-19 08:36:49 +03:00
test-grammar-llguidance.cpp Tool calls support from mainline (#723) 2025-09-01 08:38:49 +03:00
test-grammar-parser.cpp common/grammar: fix grammar parsing issues to prevent stack overflow and hangs (#1822) 2026-05-19 08:36:49 +03:00
test-iq4-ks-kt-decode.cpp vulkan : add IQ4_KS and IQ4_KT support (#2332) 2026-08-24 18:20:35 +02:00
test-jinja.cpp jinja: give each for-loop iteration a fresh scope (#2018) 2026-06-24 08:58:36 +02:00
test-json-partial.cpp common : introduce composable PEG parser combinators for chat parsing and new jinja template engine (#1369) 2026-03-09 11:03:33 +01:00
test-json-schema-to-grammar.cpp Autoparser - complete refactoring of parser architecture (#1376) 2026-04-22 10:04:13 +02:00
test-llama-grammar.cpp common/grammar: fix grammar parsing issues to prevent stack overflow and hangs (#1822) 2026-05-19 08:36:49 +03:00
test-model-load-cancel.cpp spec : add self speculative decoding, ngram and refactor (#1261) 2026-02-13 19:04:55 +01:00
test-opt.cpp code : normalize enum names (#5697) 2024-02-25 12:09:09 +02:00
test-peg-parser.cpp Autoparser - complete refactoring of parser architecture (#1376) 2026-04-22 10:04:13 +02:00
test-quantize-fns.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-quantize-perf.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-reasoning-budget.cpp Autoparser - complete refactoring of parser architecture (#1376) 2026-04-22 10:04:13 +02:00
test-regex-partial.cpp llama : add token matching support to llama-grammar (#1220) 2026-02-03 07:57:17 +02:00
test-rope.cpp Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
test-sampling.cpp Merge mainline - Aug 12 2024 (#17) 2024-08-12 15:14:32 +02:00
test-tokenizer-0.cpp spec : add self speculative decoding, ngram and refactor (#1261) 2026-02-13 19:04:55 +01:00
test-tokenizer-0.py py : logging and flake8 suppression refactoring (#7081) 2024-05-05 08:07:48 +03:00
test-tokenizer-0.sh tests : fix test-tokenizer-0.sh 2024-05-28 15:04:09 +03:00
test-tokenizer-1-bpe.cpp Server: refactor and rename functions (#1151) 2026-01-18 08:16:57 +02:00
test-tokenizer-1-spm.cpp Server: refactor and rename functions (#1151) 2026-01-18 08:16:57 +02:00
test-tokenizer-random.py Merge mainline llama.cpp (#3) 2024-07-27 07:55:01 +02:00
testing.h common : introduce composable PEG parser combinators for chat parsing and new jinja template engine (#1369) 2026-03-09 11:03:33 +01:00