{Feature} CUDA Decoding - Enable NVDEC in cibuildwheel and harden wheel test - #386
Closed
YLouWashU wants to merge 2 commits into
Closed
{Feature} CUDA Decoding - Enable NVDEC in cibuildwheel and harden wheel test#386YLouWashU wants to merge 2 commits into
YLouWashU wants to merge 2 commits into
Conversation
… build (facebookresearch#385) Summary: The cibuildwheel Linux build runs inside a manylinux container (`CIBW_BEFORE_BUILD_LINUX` -> `install_manylinux_deps.sh`). To build the `projectaria_tools` wheel with NVDEC GPU H.265 decode enabled, that container needs `nv-codec-headers` (provides the `ffnvcodec` pkg-config the XPRS NVDEC build links against). This adds a header-only clone+install of `nv-codec-headers` (tag `n12.1.14.0`, matching the internal Video Codec SDK) before the FFmpeg build. No CUDA toolkit is required at build time; the driver's `libcuda`/`libnvcuvid` are dlopen'd at runtime, so the wheel stays CUDA-agnostic. Prerequisite for enabling `PROJECTARIA_ENABLE_CUDA` in the cibuildwheel workflow (next diff in this stack). Reviewed By: kongchen1992 Differential Revision: D114393581
…el test Summary: Builds the Linux x86_64 `projectaria_tools` wheels with NVDEC GPU H.265 decode enabled, and hardens the in-CI wheel test to lock in the CUDA-agnostic guarantee. Applied to both `build-wheels-and-deploy.yml` and `test-for-build-wheels.yml`: - ubuntu cibuildwheel step: `CIBW_ENVIRONMENT_LINUX="PROJECTARIA_ENABLE_CUDA=1"` (turns on `-DENABLE_NVCODEC=ON` via `setup.py`; the build needs only `nv-codec-headers` installed by the prior diff, no GPU or CUDA toolkit). macOS wheels are unaffected -- NVDEC is Linux-only. - `CIBW_REPAIR_WHEEL_COMMAND_LINUX` adds `auditwheel repair --exclude libcuda.so.1 --exclude libnvcuvid.so.1` so the driver libs are never vendored into the wheel (they are dlopen'd at runtime). - Test wheel step: runs `has_cuda_support()` (returns False on the no-GPU runner) and, on Linux, asserts the built `_core_pybinds` extension has no `libcuda`/`libnvcuvid` in `DT_NEEDED`. GPU decode itself cannot be exercised in CI (GitHub runners have no NVIDIA GPU); it is validated manually on a GPU machine against the CI-built / TestPyPI wheel (shipping plan Stage 3.5 / 4). Reviewed By: kongchen1992 Differential Revision: D114393583
Contributor
|
@YLouWashU has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114393583. |
Contributor
|
This pull request has been merged in 01cfed6. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Builds the Linux x86_64
projectaria_toolswheels with NVDEC GPU H.265 decode enabled, and hardens the in-CI wheel test to lock in the CUDA-agnostic guarantee. Applied to bothbuild-wheels-and-deploy.ymlandtest-for-build-wheels.yml:CIBW_ENVIRONMENT_LINUX="PROJECTARIA_ENABLE_CUDA=1"(turns on-DENABLE_NVCODEC=ONviasetup.py; the build needs onlynv-codec-headersinstalled by the prior diff, no GPU or CUDA toolkit). macOS wheels are unaffected -- NVDEC is Linux-only.CIBW_REPAIR_WHEEL_COMMAND_LINUXaddsauditwheel repair --exclude libcuda.so.1 --exclude libnvcuvid.so.1so the driver libs are never vendored into the wheel (they are dlopen'd at runtime).has_cuda_support()(returns False on the no-GPU runner) and, on Linux, asserts the built_core_pybindsextension has nolibcuda/libnvcuvidinDT_NEEDED.GPU decode itself cannot be exercised in CI (GitHub runners have no NVIDIA GPU); it is validated manually on a GPU machine against the CI-built / TestPyPI wheel (shipping plan Stage 3.5 / 4).
Reviewed By: kongchen1992
Differential Revision: D114393583