[PyTorch CCA] Refactor caching allocator config code (#110123)

Summary: This diff refactors the code by moving CUDAAllocatorConfig into the header file. This config refactoring is done so that we can use the same config code for CUDA pinned memory as well.

Test Plan: sandcastle

Differential Revision: D49653265

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110123
Approved by: https://github.com/zdevito
This commit is contained in:
Banit Agrawal
2023-10-04 14:58:23 +00:00
committed by PyTorch MergeBot
parent 156aefa89b
commit 30c4c6ff9b
7 changed files with 427 additions and 388 deletions

View File

@ -22,6 +22,7 @@
#include <ATen/cuda/detail/CUDAHooks.h>
#include <ATen/cuda/jiterator.h>
#include <c10/core/StorageImpl.h>
#include <c10/cuda/CUDAAllocatorConfig.h>
#include <c10/cuda/CUDACachingAllocator.h>
#include <c10/cuda/CUDAFunctions.h>
#include <ATen/cuda/CUDAGraphsUtils.cuh>