8000 Add pinned memory support to sparse COO/CSR/CSC/BSR/BSC tensors by pearu · Pull Request #129645 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Add pinned memory support to sparse COO/CSR/CSC/BSR/BSC tensors #129645

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

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

8000
Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update on "Add pinned memory support to sparse COO/CSR/CSC/BSR/BSC te…
…nsors"

As in the title:

To register indices/values of a sparse XYZ tensor with CUDA, the following methods are supported
- `sparse_xyz_tensor(indices, values, pin_memory=True)`
- `sparse_xyz_tensor(indices, values).pin_memory()`
- `sparse_xyz_tensor(indices.pin_memory(), values.pin_memory())`

Fixes #115330




[ghstack-poisoned]
  • Loading branch information
pearu committed Jun 28, 2024
commit 2756f688e6e8105f89cd160bc324db5e121b4f3a
2 changes: 1 addition & 1 deletion aten/src/ATen/cuda/PinnedMemoryAllocator.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#include <ATen/cuda/PinnedMemoryAllocator.h>
#include <ATen/Context.h>
#include <ATen/Config.h>
#include <ATen/SparseCsrTensorUtils.h>
#include <ATen/TensorUtils.h>
#include <c10/core/Storage.h>
#include <ATen/ATen.h>
Expand Down Expand Up @@ -29,4 +28,5 @@ Tensor _pin_memory_cuda(const Tensor& self, std::optional<Device> device) {
return tensor;
}


} // namespace at::native
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0