File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5+ import cython
56from cuda .core ._memory ._device_memory_resource import DeviceMemoryResource
67from cuda .core ._memory ._ipc import IPCBufferDescriptor
78from 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
Original file line number Diff line number Diff line change 22
33from __future__ import annotations
44
5- from functools import cache
6-
75from cuda .core ._device import Device
86from cuda .core ._memory ._buffer import Buffer , MemoryResource
97from 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' ]
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ from __future__ import annotations
44
55import uuid
66
7+ import cython
78from cuda .core ._memory ._buffer import Buffer , MemoryResource
89from cuda .core ._stream import Stream
910from 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
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ from __future__ import annotations
55from collections import namedtuple
66from os import PathLike
77
8+ import cython
89from cuda .core ._device import Device
910from cuda .core ._launch_config import LaunchConfig
1011from 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
You can’t perform that action at this time.
0 commit comments