← Back to Pull requests

perf(svm): write the AVX-512 RBF kernel block with ordinary stores #4081

Closed
unknown closed this pull request without merging on Dec 02, 2026 11:13 UTC
View on GitHub
unknown unknown commented on Dec 02, 2026 08:09 UTC
Author

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>::postGemmPart ran vExp in place into mklBuff, then copied the block to dataRBlock with 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 call vExp(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; main and this branch interleaved over 5 rounds, median of 7 runs per process. Speedup over main:

| 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_kernel alone, float64 8k x 8k / float32 20k x 20k | 0.95x / 0.95x | 1.01x / 1.02x |

The standalone rbf_kernel on 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:tests pass (the host build here contains the AVX-512 kernels).

No public API or ABI changes.

🤖 Generated with Claude Code

Diff: 239 lines (+179 / -60) across 2 files Reviewer: Vika-F Review duration: 184m
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
0.42
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.2% (MEDIUM) · Higher = larger blast radius
42.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.7% · Safe to merge
16.7%