Skip to content

Conversation

@NicolasHug
Copy link
Contributor

Addresses an internal lint warning.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 17, 2025
cudaSetDevice(deviceIndex);
TORCH_CHECK(
cudaSetDevice(deviceIndex) == cudaSuccess, "Failed to set CUDA device");
AVBufferRef* hardwareDeviceCtxRaw = nullptr;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Drive-by: I removed the comment above because it's now out of place, the deviceIndex was set to a proper value just above (currently line 54)

Separately, I'm not even sure we need the deviceGuard and the call to cudaSetDevice. I we should rely on PyTorch for that kind of stuff. Maybe it'll be worth revisiting in the future, for now, it's safe to keep as-is.

@NicolasHug NicolasHug merged commit 62336a0 into meta-pytorch:main Oct 17, 2025
58 checks passed
NicolasHug added a commit to NicolasHug/torchcodec that referenced this pull request Oct 27, 2025
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.

2 participants