-
Notifications
You must be signed in to change notification settings - Fork 64
Refactor CUDA code into its own sets of files #193
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
Conversation
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
torch::Tensor dummyTensorForCudaInitialization = torch::zeros( | ||
{1}, | ||
torch::TensorOptions().dtype(torch::kUInt8).device(device)); | ||
codecContext->hw_device_ctx = av_buffer_ref(getCudaContext()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compilation is failing on this line with:
/pytorch/torchcodec/src/torchcodec/decoders/_core/CUDACommon.cpp:81:3: error: ‘codecContext’ was not declared in this scope; did you mean ‘AVCodecContext’?
https://github.com/pytorch/torchcodec/actions/runs/10570986466/job/29286351387?pr=193
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I'm working on compilation problems. I submitted a PR because the CI is the only way for me to test on GPUs right now.
@scotts has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Abandoning this PR because we are going to move CUDA changes off of main and onto a feature branch for now. I'll re-open this PR on the feature branch when we have it ready. |
Currently, the code in
VideoDecoder.cpp
has a lot of#ifdef ENABLE_CUDA
directly in functions. This refactor applies the following principles:VideoDecoder.cpp
should not need#ifdef ENABLE_CUDA
inside of it.