We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 633c4b3 commit 85d58fbCopy full SHA for 85d58fb
src/torchcodec/_core/CUDACommon.cpp
@@ -5,6 +5,7 @@
5
// LICENSE file in the root directory of this source tree.
6
7
#include "src/torchcodec/_core/CUDACommon.h"
8
+#include "src/torchcodec/_core/Cache.h" // for PerGpuCache
9
10
namespace facebook::torchcodec {
11
src/torchcodec/_core/NVDECCache.cpp
@@ -22,9 +22,7 @@ namespace facebook::torchcodec {
22
23
NVDECCache& NVDECCache::getCache(const torch::Device& device) {
24
static NVDECCache cacheInstances[MAX_CUDA_GPUS];
25
-
26
- int deviceIndex = getDeviceIndex(device);
27
- return cacheInstances[deviceIndex];
+ return cacheInstances[getDeviceIndex(device)];
28
}
29
30
UniqueCUvideodecoder NVDECCache::getDecoder(CUVIDEOFORMAT* videoFormat) {
0 commit comments