Skip to content

Update third-party dependencies#6418

Merged
JanuszL merged 6 commits into
NVIDIA:mainfrom
JanuszL:update-third-party-dependencies
Jul 17, 2026
Merged

Update third-party dependencies#6418
JanuszL merged 6 commits into
NVIDIA:mainfrom
JanuszL:update-third-party-dependencies

Conversation

@JanuszL

@JanuszL JanuszL commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Category:

Other (Configuration)

Description:

Updates the CUTLASS submodule from v4.5.0 to the upstream v4.5.2 release and
updates Black from 26.1.0 to 26.5.1 in the build images and lint workflow.
Updates the Conda protobuf packages to 7.35.1 and pins the DALI_deps build to
the matching protobuf 35.1 revision from NVIDIA/DALI_deps#165. The third-party
dependency table is updated for both dependencies.

Adds OpenCV 5 to DALI's CMake package lookup, while retaining the OpenCV 4 and
3 fallbacks. Updates the Mat-to-Tensor test helper with separate OpenCV 4 and
OpenCV 5 paths: OpenCV 5 uses the public cv::Mat::dims API, while OpenCV 4
retains the existing MatSize representation handling.

Pins Conda LMDB below 1.0. LMDB 1.0 cannot open the existing 0.9-format
DALI_extra LMDB test databases, and those datasets must not be regenerated.

Additional information:

Affected modules and functionalities:

  • third_party/cutlass submodule pin
  • third_party/README.rst dependency version/link
  • Black installation pins in the x86_64 and aarch64 build images
  • Black installation pins in the GitHub lint workflow
  • Conda protobuf and libprotobuf package pins
  • DALI_deps revision used by Docker builds
  • Conda LMDB host and runtime constraints for native DALI libraries
  • OpenCV discovery in the common CMake dependency configuration
  • OpenCV-backed Mat-to-Tensor test helpers

Key points relevant for the review:

The new CUTLASS submodule commit is the upstream v4.5.2 release tag.
Black 26.5.1 passes the existing lint workflow's formatter commands.
This PR depends on NVIDIA/DALI_deps#165 until its revision is merged into main.

OpenCV 5 requires an explicit find_package(OpenCV 5.0 ...) request: its
package config rejects the existing OpenCV 4 and 3 requests as incompatible
major versions. The lookup order is now OpenCV 5, then 4, then 3.

OpenCV 5 also bounds-checks MatSize indexing. The test helper therefore
uses mat.dims and reads only the spatial dimensions in its OpenCV 5 branch;
the OpenCV 4 branch preserves the prior behavior.

LMDB 1.0 changes the on-disk format and is mutually incompatible with LMDB
0.9 databases. Pinning the Conda package to <1.0 preserves compatibility
with the existing DALI_extra reader datasets.

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Validation:

  • git diff --check HEAD
  • cmake --build compile --target dali_test dali_kernel_test dali_python -j"$(nproc)"
  • Mat2Tensor.* (3 passed)
  • LinearTransformationCpuTest/*.*:ResamplingTest.* (186 passed; 1 expected disabled)
  • test_crop_mirror_normalize.test_cmn_vs_numpy:24 (passed on GPU)

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: DALI-4806

@greptile-apps

greptile-apps Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR bundles five related dependency updates: CUTLASS submodule bumped to v4.5.2, Black formatter pinned to 26.5.1 across all build images and the lint workflow, Conda protobuf/libprotobuf pins advanced to 7.35.1, Conda LMDB constrained to <1.0 to preserve compatibility with the 0.9-format DALI_extra test databases, and the DALI_deps revision updated to the matching companion SHA.

  • OpenCV 5 CMake support: cmake/Dependencies.common.cmake now probes for OpenCV 5.0 first (QUIET), then falls back to 4.0 (QUIET) and 3.0 (REQUIRED). dali/test/mat2tensor.h gains a #if CV_VERSION_MAJOR >= 5 branch that reads mat.dims instead of the bounds-checked mat.size[-1] and iterates only the spatial dimensions before appending the channel count.
  • Conda recipe consistency: All four conda pin sites (host and run in both dali_native_libs and dali_python_bindings) are updated in lock-step; the libopencv >=4.13,<5 conda host/run constraint is intentionally unchanged, as conda builds will continue to use OpenCV 4 while the CMake change enables OpenCV 5 in non-conda environments.

Confidence Score: 5/5

Safe to merge; all changes are version pin updates or additive feature additions with documented fallbacks.

Every change is either a version bump consistent across all pin sites, an additive CMake fallback that preserves existing behaviour when OpenCV 5 is absent, or a test-helper fix that uses the correct public OpenCV 5 API. The only finding is a stale copyright year in the modified test header.

No files require special attention beyond the minor copyright year nit in dali/test/mat2tensor.h.

Important Files Changed

Filename Overview
.github/workflows/lint.yml Black version pin bumped from 26.1.0 to 26.5.1; no logic changes.
DALI_DEPS_VERSION Placeholder SHA replaced with the real DALI_deps commit SHA from the companion PR.
cmake/Dependencies.common.cmake OpenCV 5.0 added as the first QUIET probe; OpenCV 4 and 3 remain as fallbacks in the correct order with REQUIRED on the last step.
conda/dali_native_libs/recipe/meta.yaml Protobuf bumped to 7.35.1 in host/run; LMDB pinned to <1.0 in both host and run with a clear justification comment; libopencv host/run remain at <5 (consistent with the conda-only build environment).
conda/dali_python_bindings/recipe/meta.yaml Black and black-jupyter bumped to 26.5.1; libprotobuf-static bumped to 7.35.1.
dali/test/mat2tensor.h OpenCV 5 branch added using the public mat.dims API and a bounds-safe loop; OpenCV 4 branch preserves existing behaviour; copyright year not updated.
docker/Dockerfile Black version pin updated to 26.5.1 in the pip install line.
docker/Dockerfile.build.aarch64-linux Black version pin updated to 26.5.1 in the pip install line.
third_party/README.rst CUTLASS version row updated to 4.5.2 and black row updated to 26.5.1.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CMake: BUILD_OPENCV=ON] --> B["find_package OpenCV 5.0 QUIET"]
    B -->|Found| C["Use OpenCV 5 — mat2tensor uses mat.dims"]
    B -->|Not Found| D["find_package OpenCV 4.0 QUIET"]
    D -->|Found| E["Use OpenCV 4 — mat2tensor uses mat.size legacy path"]
    D -->|Not Found| F["find_package OpenCV 3.0 REQUIRED"]
    F -->|Found| G["Use OpenCV 3 — mat2tensor uses mat.size legacy path"]
    F -->|Not Found| H["CMake fatal error"]
    C --> I["Link: opencv_core + opencv_imgproc"]
    E --> I
    G --> I
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[CMake: BUILD_OPENCV=ON] --> B["find_package OpenCV 5.0 QUIET"]
    B -->|Found| C["Use OpenCV 5 — mat2tensor uses mat.dims"]
    B -->|Not Found| D["find_package OpenCV 4.0 QUIET"]
    D -->|Found| E["Use OpenCV 4 — mat2tensor uses mat.size legacy path"]
    D -->|Not Found| F["find_package OpenCV 3.0 REQUIRED"]
    F -->|Found| G["Use OpenCV 3 — mat2tensor uses mat.size legacy path"]
    F -->|Not Found| H["CMake fatal error"]
    C --> I["Link: opencv_core + opencv_imgproc"]
    E --> I
    G --> I
Loading

Reviews (9): Last reviewed commit: "Update DALI_DEPS_VERSION sha" | Re-trigger Greptile

@JanuszL
JanuszL force-pushed the update-third-party-dependencies branch from 95f284e to 188a959 Compare July 3, 2026 11:14
@JanuszL JanuszL changed the title Update CUTLASS to v4.5.2 Update third-party dependencies Jul 3, 2026
@JanuszL
JanuszL force-pushed the update-third-party-dependencies branch from 188a959 to 588dfb3 Compare July 3, 2026 11:15
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56721308]: BUILD STARTED

Comment thread DALI_DEPS_VERSION Outdated
@JanuszL
JanuszL force-pushed the update-third-party-dependencies branch from 588dfb3 to 941b5ef Compare July 3, 2026 13:14
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56721308]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56729132]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56729132]: BUILD FAILED

@JanuszL
JanuszL force-pushed the update-third-party-dependencies branch from d4eff1a to 4f7c581 Compare July 4, 2026 16:17
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56813258]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [56813258]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57014003]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57014003]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57084828]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [57084828]: BUILD FAILED

Comment thread .github/workflows/lint.yml
JanuszL added 5 commits July 15, 2026 11:28
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@JanuszL
JanuszL force-pushed the update-third-party-dependencies branch from 2592467 to 75fd002 Compare July 15, 2026 09:28
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [58096915]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [58096915]: BUILD PASSED

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [58130928]: BUILD STARTED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [58130928]: BUILD FAILED

@dali-automaton

Copy link
Copy Markdown
Collaborator

CI MESSAGE: [58130928]: BUILD PASSED

@JanuszL
JanuszL merged commit 3f9b1b9 into NVIDIA:main Jul 17, 2026
7 checks passed
@JanuszL
JanuszL deleted the update-third-party-dependencies branch July 17, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants