Skip to content

Conversation

@mollyxu
Copy link
Contributor

@mollyxu mollyxu commented Nov 6, 2025

Support device=None in VideoDecoder

Fixes #993

Summary

This PR implements support for device=None in VideoDecoder, allowing it to use PyTorch's "current device" as determined by context managers and global settings. device=None is now the default parameter value.

Backward Compatibility

  • Existing code with explicit device="cpu" or device="cuda" works exactly as before
  • Only change: The default device will no longer be cpu but rather PyTorch's device context if set.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 6, 2025
@mollyxu mollyxu marked this pull request as ready for review November 6, 2025 21:47
Copy link
Contributor

@scotts scotts left a comment

Choose a reason for hiding this comment

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

Looks great! Approved to unblock, let's update the comments before merging.

@mollyxu mollyxu merged commit b597922 into meta-pytorch:main Nov 7, 2025
68 checks passed
@NicolasHug NicolasHug added the bug Something isn't working label Nov 10, 2025
NicolasHug added a commit to NicolasHug/torchcodec that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working 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.

Support device=None

4 participants