Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch decode images with CUDA #8422

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

deekay42
Copy link
Contributor

I'm modifying the existing decode_jpeg function to use a fused kernel for faster image decoding for large quantities of images.

Summary:
I'm adding GPU support to the existing torchvision.io.encode_jpeg function. If the input tensors are on the GPU, the CUDA version will be used and the CPU version otherwise.
Additionally, I'm adding a new function torchvision.io.encode_jpegs (plural) with uses a fused kernel and may be faster than successive calls to the singular version which incurs kernel launch overhead for each call.
If it's alright, I'll be happy to refactor decode_jpeg to follow this
convention in a follow up PR.

Test Plan:
1. pytest test -vvv
2. ufmt format torchvision
3. flake8 torchvision

Reviewers:

Subscribers:

Tasks:

Tags:
Copy link

pytorch-bot bot commented May 11, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8422

Note: Links to docs will display an error until the docs builds have been completed.

❌ 28 New Failures

As of commit ab13cc1 with merge base 5181a85 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@deekay42 deekay42 marked this pull request as draft May 11, 2024 01:45
@deekay42 deekay42 force-pushed the batched_decode branch 3 times, most recently from f74a9da to 807dca7 Compare May 11, 2024 02:17
@deekay42 deekay42 marked this pull request as ready for review May 13, 2024 14:43
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.

None yet

2 participants