← Back to Pull requests

Split out debuginfo tests for types #366

Closed
unknown closed this pull request without merging on Aug 01, 2025 09:06 UTC
View on GitHub
unknown unknown commented on Jul 31, 2025 14:45 UTC
Author

The basic scalar and array types changed slightly in llvmlite 45; Jie submitted some fixes to eliminate redundant types, which causes some differences in the IR we generate.

This PR addresses the issue in two ways:

  • For the scalar types, each type is broken out into its own test case. This removes most of the differences we see in llvmlite45, because there are no common debuginfo metadata that can be eliminated in the first place.

  • For array types (float32 is the only one tested this way in both upstream and numba-cuda) and aggregate types (complex numbers) I added a check prefix for llvmlite version >=45 and <=44. The IR is just different enough to make it difficult for the same checks to work with both versions. After Jie's fix, llvmlite no longer creates redundant debuginfo metadata nodes for basic scalar types.
  • Although it takes up quite a bit of space, I find it easier to navigate the checks with IR snippets in the test code than reading regular expressions. This is a matter of taste though, so I'm open to suggestions.

    Note the use of subtests; this should be removed in favor of parameterized tests with pytests once we are fully moved over.

    This might also be a good prompt for us to start testing with newer/development versions of llvmlite.

    <!--

    Thank you for contributing to numba-cuda :)

    Here are some guidelines to help the review process go smoothly.

    1. Please write a description in this text box of the changes that are being
    made.

    2. Please ensure that you have written units tests for the changes made/features
    added.

    3. If you are closing an issue please use one of the automatic closing words as
    noted here: https://help.github.com/articles/closing-issues-using-keywords/

    4. If your pull request is not ready for review but you want to make use of the
    continuous integration testing facilities please label it with [WIP].

    5. If your pull request is ready to be reviewed without requiring additional
    work on top of it, then remove the [WIP] label (if present) and replace
    it with [REVIEW]. If assistance is required to complete the functionality,
    for example when the C/C++ code of a feature is complete but Python bindings
    are still required, then add the label [HELP-REQ] so that others can triage
    and assist. The additional changes then can be implemented on top of the
    same PR. If the assistance is done by members of the rapidsAI team, then no
    additional actions are required by the creator of the original PR for this,
    otherwise the original author of the PR needs to give permission to the
    person(s) assisting to commit to their personal fork of the project. If that
    doesn't happen then a new PR based on the code of the original PR can be
    opened by the person assisting, which then will be the PR that will be
    merged.

    6. Once all work has been done and review has taken place please do not add
    features or make changes out of the scope of those requested by the reviewer
    (doing this just add delays as already reviewed code ends up having to be
    re-reviewed/it is hard to tell what is new etc!). Further, please do not
    rebase your branch on main/force push/rewrite history, doing any of these
    causes the context of any comments made by reviewers to be lost. If
    conflicts occur against main they should be resolved by merging main
    into the branch used for making the pull request.

    Many thanks in advance for your cooperation!

    -->

    Diff: 440 lines (+330 / -110) across 5 files Reviewer: jiel-nv Review duration: 1101m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 440 lines diff across 5 files
    0.45
    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.364
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #366"
    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: 45.3% (MEDIUM) · Higher = larger blast radius
    45.3%
    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: 17.9% · Safe to merge
    17.9%