1 #pragma once 2 3 #include <c10/core/Allocator.h> 4 #include <ATen/cuda/CachingHostAllocator.h> 5 6 namespace at::cuda { 7 getPinnedMemoryAllocator()8 inline TORCH_CUDA_CPP_API at::Allocator* getPinnedMemoryAllocator() { 9 return getCachingHostAllocator(); 10 } 11 } // namespace at::cuda 12