Skip to content

Conversation

ahmadsharif1
Copy link
Contributor

@ahmadsharif1 ahmadsharif1 commented Nov 5, 2024

  1. Add documentation for using cuda decoding.
  2. Updated the docs workflow to actually build a cuda wheel so it can be used later to generate the docs.
  3. The documentation contains instructions on how to install the cuda wheel and scenarios where we expect users to benefit from using CUDA decoding.

Result screenshot:

image

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 5, 2024
Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great tutorial! It's great to see that the UX for installing gpu-compatible wheels is fairly straightforward. I left a few comments below.

Doc job is failing with a minor build issue: https://github.com/pytorch/torchcodec/actions/runs/11734305974/job/32690104327?pr=335

As a result I haven't been able to look at the rendered docs, please let me do another round before landing :)

Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great tutorial! It's great to see that the UX for installing gpu-compatible wheels is fairly straightforward. I left a few comments below.

Doc job is failing with a minor build issue: https://github.com/pytorch/torchcodec/actions/runs/11734305974/job/32690104327?pr=335

As a result I haven't been able to look at the rendered docs, please let me do another round before landing :)

Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some more comments, I haven't been able to check the rendered docs yet

run: |
cd docs
python -m pip install -r requirements.txt
${CONDA_RUN} python -m pip install -r requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we understand why we need CONDA_RUN here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is installed in a conda env. Without CONDA_RUN the pip that's used is the outside pip

Copy link
Contributor Author

@ahmadsharif1 ahmadsharif1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review

Copy link
Contributor

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ahmadsharif1 !

first_cpu_frame = cpu_frames[0].data.to("cpu")
first_cuda_frame = cuda_frames[0].data.to("cpu")
frames_equal = torch.equal(first_cpu_frame, first_cuda_frame)
print(f"{frames_equal=}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Instead of this binary indicator, we may want to print max abs diff and mean abs diff? We could even do it across all frames.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

image

@ahmadsharif1 ahmadsharif1 merged commit 3e1f4b5 into meta-pytorch:main Nov 11, 2024
44 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants