← Back to Pull requests

Update cuslide2 to nvImageCodec 0.10.0 #1223

Merged
cdinea merged 13 files (491 lines) on Nov 18, 2026 20:18 UTC
View on GitHub
cdinea cdinea commented on Nov 09, 2026 19:09 UTC
Author

Moves cuslide2 from nvImageCodec 0.9 to v0.10.0.

Why this is not just a pin bump

cuslide2 dlopens nvImageCodec (WITH_DYNAMIC_NVIMGCODEC=ON by default) and compiles against a vendored copy of the headers, so the headers have to move with the pin.

0.10 grew nvimgcodecExecutionParams_t by two plugin-selection fields, and the library now rejects an execution-parameter struct_size that does not match its own header with NVIMGCODEC_STATUS_INTERNAL_ERROR. Compiling both vendored headers confirms the size change:

0.10.0 vendored: NVIMGCODEC_VER=1000 sizeof(ExecutionParams)=96
0.9.0  vendored: NVIMGCODEC_VER=900  sizeof(ExecutionParams)=80

NvImageCodecTiffParserManager sets exec_params.struct_size = sizeof(nvimgcodecExecutionParams_t), so with the 0.9 headers against a 0.10 library every nvimgcodecDecoderCreate would fail. The pin and the vendored headers have to move together in one change.

Changes

Vendored headers. nvimgcodec.h and nvimgcodec_version.h re-vendored from upstream v0.10.0. The in-tree 0.9 copy is upstream's verbatim apart from the short SPDX header and stripped trailing whitespace; applying that same transform to upstream v0.9.0 reproduces the committed file byte for byte, and the 0.10.0 copy here is produced the same way, so the diff is upstream's and nothing else.

Version macro. 0.10 replaces MAKE_SEMANTIC_VERSION with NVIMGCODEC_MAKE_SEMANTIC_VERSION, packing major 10000 + minor 100 + patch so a two-digit minor no longer overflows into the major. Updated at the two use sites and in the tests.

Runtime gate (check_nvimgcodec_runtime_version). Supported range moved to >=0.10.0,<0.11.0. The version it compares is produced by the loaded library, so an older library still reports the narrow encoding — but every released 0.x packs identically under both, so an old library is rejected on its version rather than misread as something in range. There is a test pinning that.

format_nvimgcodec_version() loses its ambiguous-value branch: it existed only because 0.10.0 and 1.0.0 both packed to 1000, which the widened encoding fixes, so diagnostics can now always name an exact version.

Build-time gate (cmake/deps/nvimgcodec.cmake). SONAME candidate libnvimgcodec.so.0.9.0 → libnvimgcodec.so.0.10.0 (upstream still builds SOVERSION 0, VERSION 0.10.0, so the .so.0 and .so fallbacks are unchanged). Header and find_package checks moved to the 0.10 range, and the fatal-error text now names the actual incompatibility instead of asserting a general lack of backward compatibility.

Packaging pins → >=0.10.0,<0.11.0 in dependencies.yaml, the four generated conda environments, conda/recipes/libcucim/conda_build_config.yaml, and python/cucim/pyproject.toml. All four packages are published at 0.10: libnvimgcodec, libnvimgcodec-dev and nvimgcodec at 0.10.0 on conda-forge, and nvidia-nvimgcodec-cu12 / -cu13 at 0.10.0.9 on PyPI.

What did not need to change

  • Dynlink stubs. All 21 nvImageCodec entry points cuslide2 resolves have byte-identical declarations in 0.9 and 0.10 (checked by parsing both headers), so nvimgcodec_stubs_generated.cc is unchanged. It compiles clean against the new header.

  • Symbol visibility. 0.10 stops exporting internal C++ symbols from libnvimgcodec.so. The only symbol cuslide2 passes to dlsym is nvimgcodecGetProperties, a documented C API entry point.

  • Enum values. The additions in 0.10 (NVIMGCODEC_STRUCTURE_TYPE_PLUGIN_SELECTION, NVIMGCODEC_STATUS_RESOURCE_IN_USE = 22, NVIMGCODEC_BACKEND_KIND_ANY = 0) are appended or explicitly numbered; nothing cuslide2 uses was renumbered.

  • Plugin selection. exec_params is value-initialized, so the two new fields default to "no selection", which is the behavior cuslide2 wants.

  • Other structs. nvimgcodecImageInfo_t, nvimgcodecDecodeParams_t, nvimgcodecRegion_t, nvimgcodecCodeStreamView_t, nvimgcodecProperties_t, nvimgcodecInstanceCreateInfo_t, nvimgcodecMetadata_t, nvimgcodecCodeStreamInfo_t, nvimgcodecBackend_t and nvimgcodecBackendParams_t are all unchanged.
  • Testing

    test_nvimgcodec_version.cpp was rewritten around the new range and encoding, including a case pinning that the narrow and widened encodings agree on released 0.x versions, which is what makes the runtime check sound across the transition.

    Verified locally without a CUDA build:

  • The 0.10.0 vendored header, nvimgcodec_stubs_generated.cc and nvimgcodec_wrap.cc all compile against the new headers.

  • nvimgcodec_wrap.cc's SONAME macros now produce the dlopen order libnvimgcodec.so.0.10.0, libnvimgcodec.so.0, libnvimgcodec.so.

  • Every assertion in the rewritten test file passes when the gate functions are compiled standalone against the new version header.
  • A GPU run against a real 0.10 install is still needed; that is what CI covers.

    Fixes #1204
    Fixes #1195

    Diff: 491 lines (+392 / -99) across 13 files Reviewer: cryos Review duration: 13029m
    All Vouch review confidence checks passed
    Residual risk 0.10 = Change Risk (0.58) × (1 − Review Confidence (0.82)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.58 · 491 lines diff across 13 files
    0.58
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.74 · 5 substantive comment(s)
    0.74
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    82%
    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.371
    Real PR Conversation Timeline
    13 items
    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 09, 2026 19:09 UTC
    Bot

    This pull request requires additional validation before any workflows can run on NVIDIA's runners.

    Pull request vetters can view their responsibilities here.

    Contributors can view more details about this message here.

    jakirkham jakirkham commented on Nov 10, 2026 17:13 UTC
    Contributor

    /ok to test 79072456b034ad7c45e0dfc3f4949f17874c9d0a

    cryos cryos approved these changes on Nov 10, 2026 18:05 UTC
    Approved Reviewer

    Packaging and CMake changes LGTM.

    jakirkham jakirkham approved these changes on Nov 10, 2026 19:10 UTC
    Approved Reviewer

    Approved these changes.

    jakirkham jakirkham commented on Nov 10, 2026 19:19 UTC
    Contributor

    The CUDA 12.9 wheel test [was stuck at 99%]( https://github.com/rapidsai/cucim/actions/runs/42862742540/job/130008182948?pr=1223#step:13:629 ). Canceled it and restarted.

    All other tests had passed.

    cdinea cdinea commented on Nov 16, 2026 23:49 UTC
    Author

    /ok to test 646fc83

    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 16, 2026 23:49 UTC
    Bot

    /ok to test 646fc83

    @cdinea, there was an error processing your request: E2

    See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

    cdinea cdinea commented on Nov 17, 2026 00:01 UTC
    Author

    /ok to test 646fc83

    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 17, 2026 00:01 UTC
    Bot

    /ok to test 646fc83

    @cdinea, there was an error processing your request: E2

    See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

    cdinea cdinea commented on Nov 17, 2026 00:11 UTC
    Author

    /ok to test 646fc83

    copy-pr-bot[bot] copy-pr-bot[bot] commented on Nov 17, 2026 00:11 UTC
    Bot

    /ok to test 646fc83

    @cdinea, there was an error processing your request: E2

    See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

    Reviewers
    Assignees
    cdinea cdinea
    Labels
    risk: low confidence: 82.1% 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: 57.7% (MEDIUM) · Higher = larger blast radius
    57.7%
    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: 82.1% · Lower = rushed or shallow review
    82.1%
    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: 10.3% · Safe to merge
    10.3%
    Repository