Commit eedacbc
{Feature} Packaging - Enable NVDEC GPU H.265 decoding in Linux wheels (#389)
Summary:
Explanation:
Turns GPU-accelerated H.265 decoding back on for Linux x86_64 wheels. Two changes that have to happen together:
- `cmake/Setup3rdParty.cmake`: move the VRS pin from `2f4fc9e5` (main, Aug 3rd) to `e8cd5984` (main, Aug 6th).
- `.github/workflows/build-wheels-and-deploy.yml` and `.github/workflows/test-for-build-wheels.yml`: restore `PROJECTARIA_ENABLE_CUDA=1` and the CUDA-aware `auditwheel` invocation.
They are in one diff on purpose. Enabling NVDEC against the old pin is what previously produced a wheel that segfaulted on machines with no NVIDIA driver: `xprsDecoderMaker` discarded the software decoders it had already enumerated once the CUDA probe threw, and the resulting null decoder was dereferenced. Splitting these would allow the enable to land without the fix and reintroduce that crash.
`e8cd5984` is the ShipIt export of "Restore SW decoder fallback in xprsDecoderMaker". At that commit the maker keeps the software decoders collected before the throw, continues to the next candidate when `init()` fails, and returns `nullptr` instead of an instance whose `decode()` failed.
The wheel remains CUDA-agnostic: `libcuda` and `libnvcuvid` are excluded from `auditwheel repair` because they are dlopen'd from the driver at runtime and must never be vendored. A wheel built this way imports and decodes on a machine with no GPU, using the software decoder.
Note that `BUILD_WITH_XPRS` was already forced on and is unchanged; only the NVDEC option moves.
Reproducibility:
Confirmed on the VRS GitHub mirror at `e8cd5984` that `vrs/utils/xprs/XprsDecoder.cpp` has the `decoders.empty()` check and `(void)xprs::enumDecoders(...)`, no longer has the `enumDecoders(decoders) != XprsResult::OK` early return, uses `continue` on `init()` failure, and ends with `return nullptr`; and that `xprs/nvDecoder.cpp` still carries the `cuvidGetDecoderCaps` pre-check and the destroy-before-recreate guard. A local configure with the new pin and no source override resolved `_deps/vrs-src` to HEAD `e8cd5984368d5c9344b79da2ba0e69876d20a976` with the fix present. Both workflows parse as valid YAML and each Linux cibuildwheel step carries the restored environment and repair command.
Reviewed By: kongchen1992
Differential Revision: D1150874801 parent ac4a15f commit eedacbc
3 files changed
Lines changed: 6 additions & 10 deletions
File tree
- .github/workflows
- cmake
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 152 | + | |
| 153 | + | |
156 | 154 | | |
157 | 155 | | |
158 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 151 | + | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
157 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments