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
1 change: 1 addition & 0 deletions cuda_core/cuda/core/_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ from cuda.core._context cimport Context
from cuda.core._context import ContextOptions
from cuda.core._event cimport Event as cyEvent
from cuda.core._event import Event, EventOptions
from cuda.core._memory._buffer cimport Buffer, MemoryResource
from cuda.core._resource_handles cimport (
ContextHandle,
create_context_handle_ref,
Expand Down
4 changes: 2 additions & 2 deletions cuda_core/cuda/core/_graph/_graph_builder.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class GraphCompleteOptions:
use_node_priority: bool = False


def _instantiate_graph(h_graph, options: GraphCompleteOptions | None = None) -> Graph:
def _instantiate_graph(h_graph, options: GraphCompleteOptions | None = None) -> "Graph":
params = driver.CUDA_GRAPH_INSTANTIATE_PARAMS()
if options:
flags = 0
Expand Down Expand Up @@ -322,7 +322,7 @@ class GraphBuilder:
self._building_ended = True
return self

def complete(self, options: GraphCompleteOptions | None = None) -> Graph:
def complete(self, options: GraphCompleteOptions | None = None) -> "Graph":
"""Completes the graph builder and returns the built :obj:`~_graph.Graph` object.

Parameters
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/_linker.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ cdef class Linker:
Options for the linker. If not provided, default options will be used.
"""

def __init__(self, *object_codes: ObjectCode, options: LinkerOptions = None):
def __init__(self, *object_codes: ObjectCode, options: "LinkerOptions" = None):
Linker_init(self, object_codes, options)

def link(self, target_type) -> ObjectCode:
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/_memory/_graph_memory_resource.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ cdef class cyGraphMemoryResource(MemoryResource):
stream = Stream_accept(stream) if stream is not None else default_stream()
return GMR_allocate(self, size, <Stream> stream)

def deallocate(self, ptr: DevicePointerT, size_t size, stream: Stream | GraphBuilder | None = None):
def deallocate(self, ptr: "DevicePointerT", size_t size, stream: Stream | GraphBuilder | None = None):
"""
Deallocate a buffer of the requested size. See documentation for :obj:`~_memory.MemoryResource`.
"""
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/cuda/core/_memory/_memory_pool.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ cdef class _MemPool(MemoryResource):
stream = Stream_accept(stream) if stream is not None else default_stream()
return _MP_allocate(self, size, <Stream> stream)

def deallocate(self, ptr: DevicePointerT, size_t size, stream: Stream | GraphBuilder | None = None):
def deallocate(self, ptr: "DevicePointerT", size_t size, stream: Stream | GraphBuilder | None = None):
"""Deallocate a buffer previously allocated by this resource.

Parameters
Expand Down
3 changes: 0 additions & 3 deletions cuda_core/cuda/core/_resource_handles.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ cdef extern from "_cpp/resource_handles.hpp" namespace "cuda_core":
const StreamHandle& h_stream) except+ nogil

# MR deallocation callback
ctypedef void (*MRDeallocCallback)(
object mr, cydriver.CUdeviceptr ptr, size_t size,
const StreamHandle& stream) noexcept
void register_mr_dealloc_callback "cuda_core::register_mr_dealloc_callback" (
MRDeallocCallback cb) noexcept
DevicePtrHandle deviceptr_create_with_mr "cuda_core::deviceptr_create_with_mr" (
Expand Down
Loading