Skip to content

Commit 13a5247

Browse files
authored
Merge branch 'main' into str-enums
2 parents 73c4589 + b280b9d commit 13a5247

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

cuda_core/cuda/core/graph/_subclasses.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ cdef class HostCallbackNode(GraphNode):
574574
575575
Properties
576576
----------
577-
callback_fn : callable or None
577+
callback : callable or None
578578
The Python callable (None for ctypes function pointer callbacks).
579579
"""
580580

@@ -614,7 +614,7 @@ cdef class HostCallbackNode(GraphNode):
614614
f" cfunc=0x{<uintptr_t>self._fn:x}>")
615615

616616
@property
617-
def callback_fn(self):
617+
def callback(self):
618618
"""The Python callable, or None for ctypes function pointer callbacks."""
619619
return self._callable
620620

cuda_core/docs/source/release/1.0.0-notes.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,10 @@ Breaking changes
9090
- New: ``kernel.attributes.num_regs`` and
9191
``kernel.attributes[some_dev].num_regs``
9292

93+
- Renamed :attr:`graph.HostCallbackNode.callback_fn` to
94+
:attr:`graph.HostCallbackNode.callback` to drop the redundant ``_fn`` suffix
95+
(`#1945 <https://github.com/NVIDIA/cuda-python/issues/1945>`__).
96+
9397
- Unified the conditional graph API on :class:`~graph.GraphCondition`
9498
and consistent verbs
9599
(`#1945 <https://github.com/NVIDIA/cuda-python/issues/1945>`__):

cuda_core/tests/graph/test_graph_definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ def my_callback():
387387

388388
node = g.callback(my_callback)
389389
return node, {
390-
"callback_fn": lambda v: v is my_callback,
390+
"callback": lambda v: v is my_callback,
391391
}
392392

393393

0 commit comments

Comments
 (0)