Skip to content

Mempool memory resource - IPC #446

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

Draft
wants to merge 29 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
247af8c
add IPC support to default async mempool
ksimpson-work Feb 24, 2025
4b52151
revert utils
ksimpson-work Feb 24, 2025
050e4d6
revert utils
ksimpson-work Feb 24, 2025
1da30fa
rever utils
ksimpson-work Feb 24, 2025
ebef438
fix typo
ksimpson-work Feb 25, 2025
5023339
fix typo
ksimpson-work Feb 25, 2025
d0f0bbc
merge main
ksimpson-work Feb 25, 2025
e4da633
another typo
ksimpson-work Feb 25, 2025
77678e9
make IPC buffer a descriptor not a buffer
ksimpson-work Feb 25, 2025
1711f78
support windows
ksimpson-work Feb 25, 2025
4f25290
remove super call
ksimpson-work Feb 26, 2025
24a5652
add security handle with defualt no security for now
ksimpson-work Feb 26, 2025
da08473
push for local test
ksimpson-work Feb 26, 2025
9e1d546
switch dll call
ksimpson-work Feb 26, 2025
7deb681
use library
ksimpson-work Feb 26, 2025
c4e59f6
use library
ksimpson-work Feb 26, 2025
2294632
use library
ksimpson-work Feb 26, 2025
62f1e93
use library
ksimpson-work Feb 26, 2025
2e5013a
use library
ksimpson-work Feb 26, 2025
0c82df8
use library
ksimpson-work Feb 26, 2025
1c6ee59
use library
ksimpson-work Feb 26, 2025
3074742
use library
ksimpson-work Feb 26, 2025
f35cf01
use library
ksimpson-work Feb 26, 2025
bff995a
use library
ksimpson-work Feb 26, 2025
5fd7f46
remove windows stuff from async mempool until it is supported
ksimpson-work Mar 5, 2025
d486fcb
Merge branch 'main' into IPC
ksimpson-work Mar 5, 2025
c39d9a9
remove windows stuff from async mempool until it is supported
ksimpson-work Mar 5, 2025
140ba3f
Merge remote-tracking branch 'origin/IPC' into IPC
ksimpson-work Mar 5, 2025
1bcebd5
Merge branch 'main' into IPC
ksimpson-work Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cuda_bindings/cuda/bindings/driver.pyx.in
Original file line number Diff line number Diff line change
Expand Up @@ -34305,7 +34305,7 @@ def cuMemPrefetchAsync_v2(devPtr, size_t count, location not None : CUmemLocatio
to the host NUMA node closest to the current thread's CPU by specifying
:py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` for
:py:obj:`~.CUmemLocation.type`. Note when
:py:obj:`~.CUmemLocation.type` is etiher
:py:obj:`~.type` is etiher
:py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` OR
:py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`,
:py:obj:`~.CUmemLocation.id` will be ignored.
Expand Down
1 change: 1 addition & 0 deletions cuda_core/cuda/core/experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from cuda.core.experimental._event import EventOptions
from cuda.core.experimental._launcher import LaunchConfig, launch
from cuda.core.experimental._linker import Linker, LinkerOptions
from cuda.core.experimental._memory import AsyncMempool
from cuda.core.experimental._module import ObjectCode
from cuda.core.experimental._program import Program, ProgramOptions
from cuda.core.experimental._stream import Stream, StreamOptions
Expand Down
5 changes: 3 additions & 2 deletions cuda_core/cuda/core/experimental/_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
from typing import Optional, Union

from cuda.core.experimental._context import Context, ContextOptions
from cuda.core.experimental._memory import AsyncMempool, Buffer, MemoryResource, _SynchronousMemoryResource
from cuda.core.experimental._event import Event, EventOptions
from cuda.core.experimental._memory import Buffer, MemoryResource, _DefaultAsyncMempool, _SynchronousMemoryResource

from cuda.core.experimental._stream import Stream, StreamOptions, default_stream
from cuda.core.experimental._utils.clear_error_support import assert_type
from cuda.core.experimental._utils.cuda_utils import (
Expand Down Expand Up @@ -979,7 +980,7 @@ def __new__(cls, device_id=None):
runtime.cudaDeviceGetAttribute(runtime.cudaDeviceAttr.cudaDevAttrMemoryPoolsSupported, 0)
)
) == 1:
dev._mr = _DefaultAsyncMempool(dev_id)
dev._mr = AsyncMempool._from_device(dev_id)
else:
dev._mr = _SynchronousMemoryResource(dev_id)

Expand Down
Loading