Update cuslide2 to nvImageCodec 0.10.0 #1223
/ok to test 79072456b034ad7c45e0dfc3f4949f17874c9d0a
Packaging and CMake changes LGTM.
Approved these changes.
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.
/ok to test 646fc83
/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/
/ok to test 646fc83
/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/
/ok to test 646fc83
/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/
cryos
cdinea
Moves cuslide2 from nvImageCodec 0.9 to v0.10.0.
Why this is not just a pin bump
cuslide2
dlopens nvImageCodec (WITH_DYNAMIC_NVIMGCODEC=ONby default) and compiles against a vendored copy of the headers, so the headers have to move with the pin.0.10 grew
nvimgcodecExecutionParams_tby two plugin-selection fields, and the library now rejects an execution-parameterstruct_sizethat does not match its own header withNVIMGCODEC_STATUS_INTERNAL_ERROR. Compiling both vendored headers confirms the size change:NvImageCodecTiffParserManagersetsexec_params.struct_size = sizeof(nvimgcodecExecutionParams_t), so with the 0.9 headers against a 0.10 library everynvimgcodecDecoderCreatewould fail. The pin and the vendored headers have to move together in one change.Changes
Vendored headers.
nvimgcodec.handnvimgcodec_version.hre-vendored from upstreamv0.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_VERSIONwithNVIMGCODEC_MAKE_SEMANTIC_VERSION, packingmajor 10000 + minor 100 + patchso 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 candidatelibnvimgcodec.so.0.9.0→libnvimgcodec.so.0.10.0(upstream still buildsSOVERSION 0,VERSION 0.10.0, so the.so.0and.sofallbacks are unchanged). Header andfind_packagechecks 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.0independencies.yaml, the four generated conda environments,conda/recipes/libcucim/conda_build_config.yaml, andpython/cucim/pyproject.toml. All four packages are published at 0.10:libnvimgcodec,libnvimgcodec-devandnvimgcodecat 0.10.0 on conda-forge, andnvidia-nvimgcodec-cu12/-cu13at 0.10.0.9 on PyPI.What did not need to change
nvimgcodec_stubs_generated.ccis unchanged. It compiles clean against the new header.libnvimgcodec.so. The only symbol cuslide2 passes todlsymisnvimgcodecGetProperties, a documented C API entry point.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.exec_paramsis value-initialized, so the two new fields default to "no selection", which is the behavior cuslide2 wants.nvimgcodecImageInfo_t,nvimgcodecDecodeParams_t,nvimgcodecRegion_t,nvimgcodecCodeStreamView_t,nvimgcodecProperties_t,nvimgcodecInstanceCreateInfo_t,nvimgcodecMetadata_t,nvimgcodecCodeStreamInfo_t,nvimgcodecBackend_tandnvimgcodecBackendParams_tare all unchanged.Testing
test_nvimgcodec_version.cppwas 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:
nvimgcodec_stubs_generated.ccandnvimgcodec_wrap.ccall compile against the new headers.nvimgcodec_wrap.cc's SONAME macros now produce the dlopen orderlibnvimgcodec.so.0.10.0,libnvimgcodec.so.0,libnvimgcodec.so.A GPU run against a real 0.10 install is still needed; that is what CI covers.
Fixes #1204
Fixes #1195