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 85d58fb commit a24501cCopy full SHA for a24501c
src/torchcodec/_core/Cache.h
@@ -9,7 +9,6 @@
9
#include <torch/types.h>
10
#include <memory>
11
#include <mutex>
12
-#include "src/torchcodec/_core/CUDACommon.h"
13
14
namespace facebook::torchcodec {
15
@@ -96,6 +95,11 @@ class PerGpuCache {
96
95
std::vector<std::unique_ptr<Cache<T, D>>> cache_;
97
};
98
+// Forward declaration of getDeviceIndex which exists in CUDACommon.h
99
+// This avoids circular dependency between Cache.h and CUDACommon.cpp which also
100
+// needs to include Cache.h
101
+int getDeviceIndex(const torch::Device& device);
102
+
103
template <typename T, typename D>
104
bool PerGpuCache<T, D>::addIfCacheHasCapacity(
105
const torch::Device& device,
0 commit comments