Conversation

NicolasHug

No description provided.

@facebook-github-botfacebook--bot added the CLA SignedThis label is managed by the Meta Open Source bot.label Apr 3, 2025

// Pytorch can only handle up to 128 GPUs.
// https://.com/pytorch/pytorch/blob/e30c55ee527b40d67555464b9e402b4b7ce03737/c10/cuda/CUDAMacros.h#L44
const int MAX_CUDA_GPUS = 128;
// Set to -1 to have an infinitely sized cache. Set it to 0 to disable caching.
// Set to a positive number to have a cache of that size.
const int MAX_CONTEXTS_PER_GPU_IN_CACHE = -1;
std::vector<AVBufferRef*> g_cached_hw_device_ctxs[MAX_CUDA_GPUS];
std::vector<_avbuffer_ref*> g_cached_hw_device_ctxs[MAX_CUDA_GPUS];
Copy link
Contributor

Choose a reason for hiding this comment

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

AVBufferRef should remain Pascal case

@@ -217,40 +218,41 @@ void convertAVFrameToFrameOutputOnCuda(
"x3, got ",
shape);
} else {
dst = allocateEmptyHWCTensor(height, width, videoStreamOptions.device);
dst =
allocate_empty_h_w_c_tensor(height, width, video_stream_options.device);
Copy link
Contributor

Choose a reason for hiding this comment

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

Here and below, I'd find it easier if we wrote this as allocate_empty_hwc_tensor() and nppi_nv12_to_rgb_8u_p2c3r(). Basically, we'll want to be careful about how to turn a sequence of all caps into snake case.

Sign up for free to join this conversation on . Already have an account? Sign in to comment
CLA SignedThis label is managed by the Meta Open Source bot.
None yet

Successfully merging this pull request may close these issues.