Skip to content

ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting#17951

Merged
ggerganov merged 3 commits intoggml-org:masterfrom
ixgbe:fix_riscv_q4_0_repack_selection
Dec 12, 2025
Merged

ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting#17951
ggerganov merged 3 commits intoggml-org:masterfrom
ixgbe:fix_riscv_q4_0_repack_selection

Conversation

@ixgbe
Copy link
Contributor

@ixgbe ixgbe commented Dec 12, 2025

Changes included:

  • Add ggml_cpu_get_rvv_cnt() and RVV vector-length initialization.
  • Export RVV_CNT in CPU feature list.
  • Update ggml_repack_get_optimal_repack_type() to enable Q4_0 repack when
    ggml_cpu_has_riscv_v() and rvv_cnt >= QK4_0.

@ixgbe ixgbe requested a review from ggerganov as a code owner December 12, 2025 05:26
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Dec 12, 2025
@xctan
Copy link
Collaborator

xctan commented Dec 12, 2025

I suggest using the name VLEN instead of copying the name CNT from SVE svcntX instruction families.

@ggerganov ggerganov requested a review from xctan December 12, 2025 14:06
@ggerganov ggerganov merged commit 5160443 into ggml-org:master Dec 12, 2025
67 of 69 checks passed
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
…gml-org#17951)

* ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting

Signed-off-by: Wang Yang <[email protected]>

* using the name VLEN instead of CNT

* Update ggml/include/ggml-cpu.h

---------

Signed-off-by: Wang Yang <[email protected]>
Co-authored-by: Georgi Gerganov <[email protected]>
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
…17951)

* ggml-cpu:fix RISC-V Q4_0 repack select and RVV feature reporting

Signed-off-by: Wang Yang <[email protected]>

* using the name VLEN instead of CNT

* Update ggml/include/ggml-cpu.h

---------

Signed-off-by: Wang Yang <[email protected]>
Co-authored-by: Georgi Gerganov <[email protected]>
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants