Packaging - Add pinned pybind11 dependency and align dlpack version with rocCV (v1.3) for hermetic builds
@rrawther ci sta già lavorando.
Dal 3/9/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 8
- Fork
- 13
- Merge medio
- 2g 1h
- PR unite (30g)
- 6
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ROCm/rocPyDecode
-
CMake install: no COMPONENT grouping, Python modules install to lib/ instead of site-packages Apertabug enhancement
ROCm/rocPyDecode#285 · 2 commenti · 1 assegnatario ·
-
enhancement
ROCm/rocPyDecode#284 · 1 commento · 1 assegnatario ·
-
bug
ROCm/rocPyDecode#256 · 3 commenti · 1 assegnatario ·
-
bug help wanted
ROCm/rocPyDecode#224 · 4 commenti · 3 assegnatari ·
Tutte le issue di ROCm/rocPyDecode
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
games-on-whales/wolf#509 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
bug-unconfirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100