Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uvm backend #1174

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Uvm backend #1174

wants to merge 9 commits into from

Conversation

dllehr-amd
Copy link

Add CUDAMallocManagedAllocator Backend

With the new CUDAAllocator class, we have created a new
CUDAMallocManagedAllocator, which will handle allocator requests from both
cpu and cuda device types when the backend is enabled
You can enable the backend using PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocManaged
And view inside PyTorch using torch.cuda.get_allocator_backend()

This allocator is initially rudimentary as the performance implications of a
managed allocator are still being worked out. However, the goal is to be able to
swap out the backend when running without any code change required.

jayfurmanek and others added 8 commits December 21, 2022 17:56
With the new CUDAAllocator class, we have created a new
CUDAMallocManagedAllocator, which will handle allocator requests from both
cpu and cuda device types when the backend is enabled
You can enable the backend using PYTORCH_CUDA_ALLOC_CONF=backend:cudaMallocManaged
And view inside PyTorch using torch.cuda.get_allocator_backend()

This allocator is initially rudimentary as the performance implications of a
managed allocator are still being worked out. However, the goal is to be able to
swap out the backend when running without any code change required.
@dllehr-amd dllehr-amd marked this pull request as draft February 7, 2023 16:26
@@ -1,6 +1,7 @@
#define TORCH_ASSERT_NO_OPERATORS
#include <ATen/cuda/EmptyTensor.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/UvmMemoryAllocator.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header no longer needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants