Skip to content

ggml-cpu(s390x): vectorize various vec functions - #30791

Merged
CISC merged 1 commit into
ggml-org:masterfrom
taronaeo:feat/simd-cpu-vec
Oct 19, 2026
Merged

CISC merged 1 commit into
ggml-org:masterfrom
taronaeo:feat/simd-cpu-vec

Conversation

@taronaeo

@taronaeo taronaeo commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Overview

This PR adds s390x vector intrinsic into various vector functions. Majority of the implementations were referenced from the ARM implementation. We see an at-best performance improvement of approximately 1.13x for pp512 and 1.10x for tg128.

Additional information

image image

Perplexity

Details
Granite-3.0-1B-A400M

====== Perplexity statistics ======
Mean PPL(Q)                   :  10.604782 ±   0.189686
Mean PPL(base)                :  10.578525 ±   0.188078
Cor(ln(PPL(Q)), ln(PPL(base))):  99.78%
Mean ln(PPL(Q)/PPL(base))     :   0.002479 ±   0.001189
Mean PPL(Q)/PPL(base)         :   1.002482 ±   0.001191
Mean PPL(Q)-PPL(base)         :   0.026258 ±   0.012639
====== KL divergence statistics ======
Mean    KLD:   0.008938 ±   0.000227
Maximum KLD:   1.428281
99.9%   KLD:   0.532981
99.0%   KLD:   0.098483
95.0%   KLD:   0.021852
90.0%   KLD:   0.014622
Median  KLD:   0.003667
10.0%   KLD:   0.000036
 5.0%   KLD:   0.000006
 1.0%   KLD:  -0.000000
 0.1%   KLD:  -0.000003
Minimum KLD:  -0.000030
====== Token probability statistics ======
Mean    Δp:  0.018 ± 0.014 %
Maximum Δp: 29.722%
99.9%   Δp: 15.448%
99.0%   Δp:  6.623%
95.0%   Δp:  3.027%
90.0%   Δp:  1.672%
75.0%   Δp:  0.280%
Median  Δp:  0.000%
25.0%   Δp: -0.278%
10.0%   Δp: -1.598%
 5.0%   Δp: -2.923%
 1.0%   Δp: -6.366%
 0.1%   Δp: -14.088%
Minimum Δp: -63.157%
RMS Δp    :  2.163 ± 0.052 %
Same top p: 95.706 ± 0.127 %


Llama-3.2-1B
====== Perplexity statistics ======
Mean PPL(Q)                   :  18.020235 ±   0.743449
Mean PPL(base)                :  18.009705 ±   0.741459
Cor(ln(PPL(Q)), ln(PPL(base))):  99.97%
Mean ln(PPL(Q)/PPL(base))     :   0.000585 ±   0.000992
Mean PPL(Q)/PPL(base)         :   1.000585 ±   0.000993
Mean PPL(Q)-PPL(base)         :   0.010530 ±   0.017917
====== KL divergence statistics ======
Mean    KLD:   0.000871 ±   0.000016
Maximum KLD:   0.024187
99.9%   KLD:   0.012690
99.0%   KLD:   0.005106
95.0%   KLD:   0.002253
90.0%   KLD:   0.001615
Median  KLD:   0.000666
10.0%   KLD:   0.000085
 5.0%   KLD:   0.000022
 1.0%   KLD:  -0.000004
 0.1%   KLD:  -0.000036
Minimum KLD:  -0.000086
====== Token probability statistics ======
Mean    Δp:  0.009 ± 0.009 %
Maximum Δp:  6.510%
99.9%   Δp:  4.751%
99.0%   Δp:  1.990%
95.0%   Δp:  1.035%
90.0%   Δp:  0.598%
75.0%   Δp:  0.132%
Median  Δp:  0.000%
25.0%   Δp: -0.127%
10.0%   Δp: -0.576%
 5.0%   Δp: -1.010%
 1.0%   Δp: -1.964%
 0.1%   Δp: -4.064%
Minimum Δp: -4.786%
RMS Δp    :  0.664 ± 0.018 %
Same top p: 97.980 ± 0.197 %

Requirements

Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
@taronaeo taronaeo added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Oct 19, 2026
@taronaeo
taronaeo requested a review from ggerganov as a code owner October 19, 2026 06:02
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Oct 19, 2026
@CISC
CISC merged commit 42b7003 into ggml-org:master Oct 19, 2026
34 of 37 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
Signed-off-by: Aaron Teo <aaron.teo1@ibm.com>
@BrewTestBot BrewTestBot mentioned this pull request Oct 28, 2026
1 task done
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 merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants