← Back to Pull requests

conda: build and package the cuslide2 plugin in libcucim #1221

Closed
unknown closed this pull request without merging on Nov 23, 2026 20:49 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 18:11 UTC
Author

This PR is on top of #1219 (https://github.com/rapidsai/cucim/pull/1219), so that the tests
added there (test_cuslide2_plugin.py, synthetic TIFF files written with tifffile) also run against
the conda packages. Until #1219 is merged, this PR also shows its two commits. The change here is
the last commit, conda: build and package the cuslide2 plugin in libcucim.

Summary

closes #1212

The libcucim conda package does not contain cucim.kit.cuslide2@<version>.so. With
ENABLE_CUSLIDE2=1, opening any TIFF fails:

[Plugin: cucim.kit.cuslide2] Could not load the dynamic library from cucim.kit.cuslide2@26.10.00.so. ...
RuntimeError: Dependent library 'cucim.kit.cuslide2@26.10.00.so' cannot be loaded!

The recipe builds only the other two plugins (for plugin_name in cuslide cumed). The pip wheels
ship cuslide2, and the recipe already depends on libnvimgcodec (which brings in libnvjpeg,
libnvjpeg2k0 and libnvtiff), but nothing in the package used it. I saw this with the 26.10.00
packages from the rapidsai channel and with the 26.12.00a34 nightly libcucim.

Changes

  • conda/recipes/libcucim/recipe.yaml: build cuslide2 together with cuslide and cumed. The

  • static helper library of cuslide2 (libnvimgcodec_dynlink.a, only needed to link the plugin) is
    removed from the package.
  • README.md: the notice in the cuslide2 section said that cuslide is deprecated from 26.04 and

  • removed in 26.08. It now says that cuslide is still the default plugin, that cuslide2 is
    opt-in and is included in the pip wheels and in the conda packages, and that cuslide is planned
    to be deprecated. Please check the wording of the deprecation plan.

    nvImageCodec is loaded at runtime with dlopen. The plugin's RPATH is $ORIGIN, so it finds
    $PREFIX/lib/libnvimgcodec.so.0 and $PREFIX/lib/extensions/ from the libnvimgcodec dependency.
    The pip-specific changes (extras, library lookup in site-packages/nvidia/nvimgcodec) are in #1219
    and are not needed here.

    Testing

    I built the recipe locally with rattler-build 0.80.0 (--experimental, CUDA 13.0, Python 3.13,
    channels rapidsai and conda-forge, without sccache), following ci/build_cpp.sh:

  • The build succeeds, including the overlinking check. The package contains cucim.kit.cuslide@,

  • cucim.kit.cuslide2@ and cucim.kit.cumed@26.12.00.so in lib/, each with RPATH $ORIGIN/, and
    no libnvimgcodec_dynlink.a.
  • I installed the package into a new environment with mamba (this pulled in libnvimgcodec 0.9.0,

  • libnvjpeg2k0, libnvtiff and libnvjpeg), and ran the tests from #1219 with the plugin
    directory of the Python package set to that environment's lib and no LD_LIBRARY_PATH: 4 passed
    (Deflate, LZW, JPEG and JPEG 2000 pyramids, on the CPU and the GPU).
  • The Python extension in that run came from a source build of main because I did not build the

  • cucim conda package. Only the plugins came from the conda package.

    CI builds and tests the packages, so it is the final check. In particular, the tests from #1219 now
    run with the plugin in the conda test jobs.

    Not in this PR

  • The wheels load two copies of libcucim (separate PR).

  • cuslide2 cannot read strip-based JPEG associated images (the Philips TIFF macro image).
  • 🤖 Generated with Claude Code

    Diff: 420 lines (+315 / -105) across 5 files Reviewer: msarahan Review duration: 20318m
    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 · 420 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.362
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1221"
    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% (MEDIUM) · Higher = larger blast radius
    45%
    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.8% · Safe to merge
    17.8%
    Repository