|
21 | 21 | CUDA Decoding can offer speed-up over CPU Decoding in a few scenarios: |
22 | 22 |
|
23 | 23 | #. You are decoding a large resolution video |
24 | | -#. You are decoding a large batch of videos that's saturting the CPU |
| 24 | +#. You are decoding a large batch of videos that's saturating the CPU |
25 | 25 | #. You want to do whole-image transforms like scaling or convolutions on the decoded tensors |
26 | 26 | after decoding |
27 | 27 | #. Your CPU is saturated and you want to free it up for other work |
28 | 28 |
|
29 | | -In some scenarios CUDA Decoding can be slower than CPU Decoding, example: |
| 29 | +Here are situations where CUDA Decoding may not make sense: |
30 | 30 |
|
31 | | -#. If your GPU is already busy and CPU is not |
32 | | -#. If you have small resolution videos and the PCI-e transfer latency is large |
33 | 31 | #. You want bit-exact results compared to CPU Decoding |
| 32 | +#. If you have small resolution videos and the PCI-e transfer latency is large |
| 33 | +#. If your GPU is already busy and CPU is not |
34 | 34 |
|
35 | 35 | It's best to experiment with CUDA Decoding to see if it improves your use-case. With |
36 | | -TorchCodec you can simply pass in a device parameter to the VideoDecoder class to |
37 | | -use CUDA Decoding. |
| 36 | +TorchCodec you can simply pass in a device parameter to the |
| 37 | +:class:`~torchcodec.decoders.VideoDecoder` class to use CUDA Decoding. |
38 | 38 |
|
39 | 39 | In order use CUDA Decoding will need the following installed in your environment: |
40 | 40 |
|
41 | 41 | #. CUDA-enabled pytorch |
42 | | -#. FFMPEG binaries that support NVDEC-enabled codecs |
| 42 | +#. FFmpeg binaries that support NVDEC-enabled codecs |
43 | 43 | #. libnpp and nvrtc (these are usually installed when you install the full cuda-toolkit) |
44 | 44 |
|
45 | 45 |
|
46 | | -FFMPEG versions 5, 6 and 7 from conda-forge are built with NVDEC support and |
47 | | -you can install them by running (for example to install ffmpeg version 7): |
| 46 | +FFmpeg versions 5, 6 and 7 from conda-forge are built with NVDEC support and you can |
| 47 | +install them with conda. For example, to install FFmpeg version 7: |
48 | 48 |
|
49 | 49 | .. code-block:: bash |
50 | 50 |
|
|
0 commit comments