Skip to content

{Feature} CUDA Decoding - Install nv-codec-headers in manylinux wheel build - #385

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

{Feature} CUDA Decoding - Install nv-codec-headers in manylinux wheel build#385
YLouWashU wants to merge 2 commits into
facebookresearch:mainfrom
YLouWashU:export-D114393581

Conversation

@YLouWashU

Copy link
Copy Markdown
Contributor

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

)

Summary:

Explanation:
`projectaria_tools` builds VRS via `FetchContent` with a pinned `GIT_TAG` in
`cmake/Setup3rdParty.cmake`. The previous pin (`125db715`, main Jun 26, 2026)
predates the XPRS NVDEC changes, so `core/python/XprsPyBind.h` references
`xprs::hasCudaSupport` while the fetched VRS does not declare it. The external
wheel build fails with:

```
core/python/XprsPyBind.h:152:14: error: no member named 'hasCudaSupport' in namespace 'xprs'
      &xprs::hasCudaSupport,
```

This bumps the VRS pin to `2f4fc9e555311928bc4643ea251a1542216f5e74`, which
carries the NVDEC symbols (`xprs::hasCudaSupport` plus the `ENABLE_NVCODEC`
plumbing), unblocking NVDEC in the wheel build.

Reproducibility:
The pinned commit resolves in `facebookresearch/vrs`, so `FetchContent` can
fetch it and the wheel build can compile `XprsPyBind.h`. The cibuildwheel jobs
on the child diffs exercise the resulting wheel.

Differential Revision: D114445000
… build

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
@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 D114393581.

@meta-codesync

meta-codesync Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in 9316cc7.

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