Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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_core/build_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_cuda_paths():
)

nthreads = int(os.environ.get("CUDA_PYTHON_PARALLEL_LEVEL", os.cpu_count() // 2))
compile_time_env = {"CUDA_CORE_BUILD_MAJOR": _get_proper_cuda_bindings_major_version()}
compile_time_env = {"CUDA_CORE_BUILD_MAJOR": int(_get_proper_cuda_bindings_major_version())}
_extensions = cythonize(
ext_modules,
verbose=True,
Expand Down
4 changes: 4 additions & 0 deletions cuda_core/cuda/core/experimental/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
DeviceMemoryResourceOptions,
GraphMemoryResource,
LegacyPinnedMemoryResource,
ManagedMemoryResource,
ManagedMemoryResourceOptions,
MemoryResource,
PinnedMemoryResource,
PinnedMemoryResourceOptions,
VirtualMemoryResource,
VirtualMemoryResourceOptions,
)
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/experimental/_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ class Device:
if self._uuid is None:
dev = self._id
with nogil:
IF CUDA_CORE_BUILD_MAJOR == "12":
IF CUDA_CORE_BUILD_MAJOR == 12:
HANDLE_RETURN(cydriver.cuDeviceGetUuid_v2(&uuid, dev))
ELSE: # 13.0+
HANDLE_RETURN(cydriver.cuDeviceGetUuid(&uuid, dev))
Expand Down
Empty file.
2 changes: 2 additions & 0 deletions cuda_core/cuda/core/experimental/_memory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
from ._graph_memory_resource import * # noqa: F403
from ._ipc import * # noqa: F403
from ._legacy import * # noqa: F403
from ._managed_memory_resource import * # noqa: F403
from ._pinned_memory_resource import * # noqa: F403
from ._virtual_memory_resource import * # noqa: F403
5 changes: 3 additions & 2 deletions cuda_core/cuda/core/experimental/_memory/_buffer.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ cimport cython
from libc.stdint cimport uintptr_t, int64_t, uint64_t

from cuda.bindings cimport cydriver
from cuda.core.experimental._memory._device_memory_resource cimport DeviceMemoryResource
from cuda.core.experimental._memory._device_memory_resource import DeviceMemoryResource
from cuda.core.experimental._memory._pinned_memory_resource import PinnedMemoryResource
from cuda.core.experimental._memory._ipc cimport IPCBufferDescriptor, IPCDataForBuffer
from cuda.core.experimental._memory cimport _ipc
from cuda.core.experimental._stream cimport Stream_accept, Stream
Expand Down Expand Up @@ -106,7 +107,7 @@ cdef class Buffer:

@classmethod
def from_ipc_descriptor(
cls, mr: DeviceMemoryResource, ipc_descriptor: IPCBufferDescriptor,
cls, mr: DeviceMemoryResource | PinnedMemoryResource, ipc_descriptor: IPCBufferDescriptor,
stream: Stream = None
) -> Buffer:
"""Import a buffer that was exported from another process."""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@
#
# SPDX-License-Identifier: Apache-2.0

from cuda.bindings cimport cydriver
from cuda.core.experimental._memory._buffer cimport MemoryResource
from cuda.core.experimental._memory._memory_pool cimport _MemPool
from cuda.core.experimental._memory._ipc cimport IPCDataForMR


cdef class DeviceMemoryResource(MemoryResource):
cdef:
int _dev_id
cydriver.CUmemoryPool _handle
bint _mempool_owned
IPCDataForMR _ipc_data
object _attributes
object _peer_accessible_by
object __weakref__
cdef class DeviceMemoryResource(_MemPool):
pass


cpdef DMR_mempool_get_access(DeviceMemoryResource, int)
Loading
Loading