← Back to Pull requests

rocm_sdk: test rocJPEG/rocDecode init in rocm-sdk test #10420

Open
unknown opened this pull request with 338 lines diff across 4 files
View on GitHub
unknown unknown commented on Dec 02, 2026 05:13 UTC
Author

Motivation

Before #10115, a runtime-only pip install rocm[libraries] passed rocm-sdk test even though rocJPEG and rocDecode could not initialize: on nightly 10.3.0a20261118 the existing 19 tests pass, while the two new tests fail at vaInitialize. rocm-sdk test only loaded librocjpeg and librocdecode, which doesn't load their bundled libva and VA driver, and rocJPEG's and rocDecode's own tests run against a full ROCm tree with ROCM_PATH set, so neither caught the wheel-layout failure (#10187).

Technical Details

Two ROCmCoreTest methods run the new rocm_sdk/tests/media_init.py in a child process per library, which drops ROCM_PATH and LIBVA_ and creates and destroys a rocJPEG hardware decoder and a rocDecode decoder on HIP device 0; they skip on non-Linux, WSL, a preloaded sanitizer runtime, no GPU, or a GPU whose kernel driver reports no VCN JPEG/decode engine (TheRock ships gfx900/gfx906 wheels, which have none), and fail otherwise. rocm-sdk test also gates the PyTorch tests in test_pytorch_wheels.yml, so a media-stack failure now skips those too; the CI-only step this PR first added is removed.

Issue Tracking

GitHub issue: https://github.com/ROCm/TheRock/issues/10187
JIRA ID: AICV-461

Test Plan

  • rocm-sdk test with these tests on nightly 10.3.0a20261120 wheels (runtime-only and with devel) on a gfx1100 machine: on the host and in a local Ubuntu 24.04 container with only /dev/kfd and /dev/dri, /opt/rocm masked and no network.

  • The same with no GPU devices, with the gfx1036 iGPU as HIP device 0, with a Python 3.10 interpreter, with ROCM_PATH and LIBVA_* set, and with an ASan runtime path in LD_PRELOAD (as test_rocm_wheels.yml sets for ASan groups).

  • rocm-sdk test on the pre-#10115 nightly rocm[libraries,device-gfx1100]==10.3.0a20261118 in a fresh venv.

  • pre-commit and the packaging unit tests (build_tools/tests/py_packaging_test.py and related).
  • Test Result

  • 10.3.0a20261120: 21/21 runtime-only (the existing 19 plus these two) and 30/30 with devel. Each new test prints what it did, for example rocdecode: created and destroyed a HEVC 1280x720 decoder on HIP device 0 (8-bit 4:2:0 to NV12: HEVC, AVC, AV1, VP9).

  • No GPU devices: both new tests skip ("HIP sees no GPU"). ASan runtime preloaded: both skip.

  • 10.3.0a20261118: the existing 19 tests pass, and both new tests fail at vaInitialize (ROCJPEG_STATUS_NOT_INITIALIZED, ROCDEC_RUNTIME_ERROR).

  • pre-commit and 123 packaging unit tests pass.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • 🤖 Generated with Claude Code

    Diff: 338 lines (+253 / -85) across 4 files Reviewer: ScottTodd Review duration: 2105m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.42) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 338 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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.349
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #10420"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 24.1% · Safe to merge
    24.1%
    Repository