Skip to content

Commit 6efc348

Browse files
benhgpre-commit-ci[bot]kkraus14leofang
authored
[FEA]: Add a MemoryResource which uses CUDA VMM APIs to allocate memory (#968)
* commit initial draft * add modification/growing option * add tests * Add tests and make them pass * Fix format with pre-commit hooks * Fix format with pre-commit hooks * Expose enumertor options through VMMAllocationOptions rather than exporting driver enums * fix merge conflict * fix pre-commit issues * [pre-commit.ci] auto code formatting * Address Leo's first comments * save state before I muck with error handling and it gets too messy * Overhaul the error handling and implement a Transaction() class to help with that. * fix re-importation of dataclasses * Checkpoint with modified tests and code with comments taken into account passing * docstrings, a couple review comments * address a review comment * [pre-commit.ci] auto code formatting * First pass on Keith's comments * Second pass on Keith's comments * Added helper function for error handling * [pre-commit.ci] auto code formatting * need to import, not cimport * need to import, not cimport * build and test fixes * [pre-commit.ci] auto code formatting * address next round of comments * [pre-commit.ci] auto code formatting * Next round of review comments * Update cuda_core/cuda/core/experimental/_memory.pyx Co-authored-by: Keith Kraus <[email protected]> * Handle missing error check and address review comments * nit: hide non-public dataclass members * add basic docs * add windows support * remove windows tests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Keith Kraus <[email protected]> Co-authored-by: Leo Fang <[email protected]>
1 parent 7c65677 commit 6efc348

File tree

6 files changed

+700
-4
lines changed

6 files changed

+700
-4
lines changed

cuda_core/cuda/core/experimental/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
DeviceMemoryResourceOptions,
5656
LegacyPinnedMemoryResource,
5757
MemoryResource,
58+
VirtualMemoryResource,
59+
VirtualMemoryResourceOptions,
5860
)
5961
from cuda.core.experimental._module import Kernel, ObjectCode # noqa: E402
6062
from cuda.core.experimental._program import Program, ProgramOptions # noqa: E402

0 commit comments

Comments
 (0)