feat(primbench): Adding Function To Get All Bytes Per Second #12119
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 273 lines diff across 3 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.336
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #12119"
general
weight: 0.35
Naraenda
Motivation
While running kernel tuner for
device_segmented_radix_sortI noticed that the generated params were extremely good for longer segment lengths while extremely bad for short ones.By adding this function in
primbenchI am hoping that we can improve kernel tuning for the small segment lengths as well.JIRA ID: AIPRIMS-236 & EXSWSTRHPC-322
Note: See #11678 to see how the new function is used.
Technical Details
The current way Kernel Tuner (
generate.py) choose a config is by taking the min time returned by a.cpp.jinja2file across the different params. Currently it is just based solely onm_last_bytes_per_second. However in the case of something likedevice_segmented_radix_sort,m_last_bytes_per_secondis the total time taken across allsegment countsandsegment lengths(see segmented_radix_sort constructor and segmented_radix_sort run). This means that them_last_bytes_per_secondis heavily weighted towards the bigger segments. The result is that the tuned params are very good for larger segments while it performs poorly for the smaller segments.By implementing
get_all_bytes_per_secondinprimbenchthis gives us the chance to take each individual time and calculate the geometric mean of the segments, and hopefully get a config that does not hurt the smaller segments.Test Plan
Generate new tune params and compare the results of just using
m_last_bytes_per_secondand usingget_all_bytes_per_second. Ifget_all_bytes_per_seconddoes better than I will open this PR.Test Result
Pending results.
Submission Checklist