Packaging - Add pinned pybind11 dependency and align dlpack version with rocCV (v1.3) for hermetic builds
@rrawther is already working on this.
Since Sep 3, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem
rocPyDecode has two related dependency issues that affect hermetic build environments like TheRock's manylinux pipeline:
1. pybind11 version is unpinned
CMakeLists.txt uses find_package(pybind11 REQUIRED) with no version constraint, resolving to whatever the system provides. This means:
- Different build hosts can produce binaries linked against different pybind11 versions
- manylinux container (RHEL-based, no
-develsystem packages) has no pybind11 at all — the build will fail silently or pick up an incompatible version
The companion library rocCV python/CMakeLists.txt pins pybind11 at v3.0.2 via FetchContent. rocPyDecode should be aligned to the same major version (v3.x).
2. dlpack version mismatch with rocCV
rocPyDecode's FindDLPACK.cmake searches for dlpack/dlpack.h in system paths and $ROCM_PATH/include with no version check. It accepts dlpack v1.0 (the version documented in rocPyDecode-requirements.py).
rocCV pins dlpack at v1.3. When both libraries are built together in a super-project, they must agree on a single dlpack version. Since minor-version bumps are additive (same major = 1), v1.3 is a drop-in superset of v1.0, but the discrepancy is a maintenance hazard.
3. FindDLPACK.cmake cannot be overridden by a super-project
The current FindDLPACK.cmake only searches system paths and $ROCM_PATH/include. A super-project that vendors dlpack at a specific location and passes -DDLPACK_DIR=/path cannot reliably redirect the search — the module ignores DLPACK_DIR as a CMake variable (it reads the env var $ENV{DLPACK_DIR} instead).
Requested changes
- Pin pybind11 to v3.0.x (matching rocCV). Prefer
find_package(pybind11 3.0 QUIET)first so super-projects can provide it via-Dpybind11_DIR=, withFetchContentas fallback for standalone builds:
find_package(pybind11 3.0 QUIET CONFIG)
if(NOT pybind11_FOUND)
FetchContent_Declare(
pybind11
URL https://github.com/pybind/pybind11/archive/refs/tags/v3.0.4.tar.gz
URL_HASH SHA256=<hash>
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(pybind11)
endif()
- Align dlpack to v1.3 (matching rocCV). Update
FindDLPACK.cmaketo also honour theDLPACK_DIRCMake variable (not just the environment variable), so super-projects can pass-DDLPACK_DIR=/path:
find_path(DLPACK_INCLUDE_DIRS
NAMES dlpack/dlpack.h
HINTS
${DLPACK_DIR}/include # CMake variable (super-project override)
$ENV{DLPACK_DIR}/include # env variable (existing behaviour)
$ENV{ROCM_PATH}/include
PATHS
${ROCM_PATH}/include
/usr/include
/usr/local/include
)
These changes are backward-compatible — standalone builds continue to work exactly as before, while hermetic super-project builds can supply pinned versions without network access.
- Dominant language
- C++
- Stars
- 8
- Forks
- 13
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ROCm/rocPyDecode
-
bug enhancement
ROCm/rocPyDecode#285 · 2 comments · 1 assignee ·
-
enhancement
ROCm/rocPyDecode#284 · 1 comment · 1 assignee ·
-
bug
ROCm/rocPyDecode#256 · 3 comments · 1 assignee ·
-
bug help wanted
ROCm/rocPyDecode#224 · 4 comments · 3 assignees ·
All issues in ROCm/rocPyDecode
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·