perf(svm): write the AVX-512 RBF kernel block with ordinary stores #4081
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 239 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.328
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #4081"
general
weight: 0.35
Vika-F
Description
On an Intel CPU, SVC/SVR predict with the RBF kernel was slower on the AVX-512 code path than on the AVX2 one (about 1.45x slower with the CPU dispatch capped to AVX2).
Cause.
HelperKernelRBF<..., avx512>::postGemmPartranvExpin place intomklBuff, then copied the block todataRBlockwith non-temporal stores (_mm512_stream_pd/ps). SVM predict multiplies that block by the dual coefficients right after it is written, so the streaming stores evicted it from cache and the next reads went to memory. The generic (AVX2) and SVE versions callvExp(n, mklBuff, dataRBlock)directly.Change. The AVX-512 versions now call
vExp(n, mklBuff, dataRBlock)too; the alignment prologue, the streaming copy and the tail copy are gone.Performance (measured with Claude Code). Intel CPU, 16 cores of one socket, sklearnex on top of oneDAL built with Make/icx;
mainand this branch interleaved over 5 rounds, median of 7 runs per process. Speedup overmain:| case | AVX-512 | AVX2 (dispatch capped) |
|---|---|---|
| SVC predict, float64, 10k train / 20k test, 32 features | 1.44x | 1.00x |
| SVC predict, float32, same | 1.51x | 0.99x |
| SVC predict, float64, 128 features | 1.25x | 1.01x |
| SVC fit, float64 / float32, 10k x 32 | 0.99x / 0.99x | 1.01x / 1.01x |
|
rbf_kernelalone, float64 8k x 8k / float32 20k x 20k | 0.95x / 0.95x | 1.01x / 1.02x |The standalone
rbf_kernelon a large output is where the streaming stores helped: about 5% slower now, with run-to-run ranges that overlap 1.0. If that matters more than predict, the alternative is to keep the streaming copy above a size threshold.Testing.
bazel test --config=host //cpp/oneapi/dal/algo/rbf_kernel:tests //cpp/oneapi/dal/algo/svm:testspass (the host build here contains the AVX-512 kernels).No public API or ABI changes.
🤖 Generated with Claude Code