Skip to content

Commit f5b239c

Browse files
committed
Regenerate .pyi files, but I am a bit unsure the critical_section is good...
Signed-off-by: Sebastian Berg <sebastianb@nvidia.com>
1 parent 91cf6d0 commit f5b239c

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

cuda_core/cuda/core/_memory/_buffer.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import cython
56
from cuda.core._memory._device_memory_resource import DeviceMemoryResource
67
from cuda.core._memory._ipc import IPCBufferDescriptor
78
from cuda.core._memory._pinned_memory_resource import PinnedMemoryResource
@@ -88,6 +89,7 @@ class Buffer:
8889
"""
8990

9091
@property
92+
@cython.critical_section
9193
def ipc_descriptor(self) -> IPCBufferDescriptor:
9294
"""Descriptor for sharing this buffer with other processes."""
9395

cuda_core/cuda/core/_memory/_graph_memory_resource.pyi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
from __future__ import annotations
44

5-
from functools import cache
6-
75
from cuda.core._device import Device
86
from cuda.core._memory._buffer import Buffer, MemoryResource
97
from cuda.core._stream import Stream
@@ -113,7 +111,6 @@ class GraphMemoryResource(cyGraphMemoryResource):
113111
...
114112

115113
@classmethod
116-
@cache
117114
def _create(cls, device_id: int) -> GraphMemoryResource:
118115
...
119116
__all__ = ['GraphMemoryResource']

cuda_core/cuda/core/_memory/_memory_pool.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ from __future__ import annotations
44

55
import uuid
66

7+
import cython
78
from cuda.core._memory._buffer import Buffer, MemoryResource
89
from cuda.core._stream import Stream
910
from cuda.core.graph import GraphBuilder
@@ -97,6 +98,7 @@ class _MemPool(MemoryResource):
9798
"""
9899

99100
@property
101+
@cython.critical_section
100102
def attributes(self) -> _MemPoolAttributes:
101103
"""Memory pool attributes."""
102104

cuda_core/cuda/core/_module.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ from __future__ import annotations
55
from collections import namedtuple
66
from os import PathLike
77

8+
import cython
89
from cuda.core._device import Device
910
from cuda.core._launch_config import LaunchConfig
1011
from cuda.core._stream import Stream
@@ -253,6 +254,7 @@ class Kernel:
253254
...
254255

255256
@property
257+
@cython.critical_section
256258
def attributes(self) -> KernelAttributes:
257259
"""Get the read-only attributes of this kernel."""
258260

@@ -265,6 +267,7 @@ class Kernel:
265267
"""list[ParamInfo]: (offset, size) for each argument of this function"""
266268

267269
@property
270+
@cython.critical_section
268271
def occupancy(self) -> KernelOccupancy:
269272
"""Get the occupancy information for launching this kernel."""
270273

0 commit comments

Comments
 (0)