Skip to content

{Feature} CUDA Decoding - Enable NVDEC in cibuildwheel and harden wheel test - #386

Closed
YLouWashU wants to merge 2 commits into
facebookresearch:mainfrom
YLouWashU:export-D114393583
Closed

{Feature} CUDA Decoding - Enable NVDEC in cibuildwheel and harden wheel test#386
YLouWashU wants to merge 2 commits into
facebookresearch:mainfrom
YLouWashU:export-D114393583

Conversation

@YLouWashU

Copy link
Copy Markdown
Contributor

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

… 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
@meta-cla meta-cla Bot added the cla signed label Aug 3, 2026
@meta-codesync

meta-codesync Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

@YLouWashU has exported this pull request. If you are a Meta employee, you can view the originating Diff in D114393583.

@meta-codesync

meta-codesync Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 01cfed6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant