← Back to Pull requests

fix(rocprim): remove unused architectures at build time instead of creating empty kernel #13311

Closed
unknown closed this pull request without merging on Oct 20, 2026 15:24 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 12:12 UTC
Author

Motivation

Currently we make all but one kernel empty if we know at compile time time what the architecture is. To improve build time, instead of making them empty we are not making them at all.

JIRA ID : EXSWSTRHPC-338

Technical Details

We created the new scoring system for choosing the best config. This is done to put the logic in that one helper function, match_target, to ensure the same policy is used at runtime as at compile time.
We also moved the logic for emptying the kernel to the for_each function. This ensures that the kernels are not even created.
These changes should only change removing the empty kernels. This is good for reducing the amount of code in the assembly, but also could help with reducing the build time.
The generic arch and spirv logic that was in the trampoline before is no longer needed, since it will just give back an unknown arch with device_target_arch in that case it will build all kernels just as before.

Test Plan

Compile and runs some tests for spirv generic architectures and normal architectures.

Test Result

I have tested both build and runs with spirv and generic architectures, these did not change with the changes. With normal architectures it compiled faster and reduced the assembly quite massively.

Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/GOVERNANCE.md#pull-requests.
  • Diff: 180 lines (+135 / -45) across 2 files Reviewer: umfranzw Review duration: 17472m
    All Vouch review confidence checks passed
    Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.36 · 180 lines diff across 2 files
    0.36
    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.311
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #13311"
    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: 35.5% (MEDIUM) · Higher = larger blast radius
    35.5%
    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: 14% · Safe to merge
    14%