framework/pytorch/op_cuda_runtime_cpu.cc
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "framework/pytorch/op_cuda_runtime.h" | ||
| 2 | |||
| 3 | // CPU-only fallback for builds without a CUDA toolkit: the stream | ||
| 4 | // synchronization is a no-op and page-locking always reports failure so the | ||
| 5 | // callers take their non-pinned path. | ||
| 6 | |||
| 7 | namespace recstore { | ||
| 8 | namespace framework { | ||
| 9 | |||
| 10 | std::function<void()> | ||
| 11 | ✗ | RecordCudaCompletionForTensor(const torch::Tensor& tensor) { | |
| 12 | ✗ | TORCH_CHECK(!tensor.is_cuda(), "CUDA staging requires a CUDA build"); | |
| 13 | ✗ | return [] {}; | |
| 14 | } | ||
| 15 | |||
| 16 | ✗ | void SynchronizeCurrentCudaStreamForTensor(const torch::Tensor& tensor) { | |
| 17 | (void)tensor; | ||
| 18 | ✗ | } | |
| 19 | |||
| 20 | ✗ | void RetainUntilCudaComplete(const torch::Tensor&, | |
| 21 | std::function<void()> release) { | ||
| 22 | ✗ | release(); | |
| 23 | ✗ | } | |
| 24 | |||
| 25 | } // namespace framework | ||
| 26 | } // namespace recstore | ||
| 27 |