From 2c2bf5c291ca9c73c34ad72e1ddf4c45bef4d429 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 9 Oct 2024 08:23:30 +0000 Subject: [PATCH 1/2] Fix numpydoc section names --- python/rmm/rmm/statistics.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/python/rmm/rmm/statistics.py b/python/rmm/rmm/statistics.py index 279e45dc6..2dabedce6 100644 --- a/python/rmm/rmm/statistics.py +++ b/python/rmm/rmm/statistics.py @@ -74,8 +74,8 @@ def enable_statistics() -> None: def get_statistics() -> Optional[Statistics]: """Get the current allocation statistics. - Return - ------ + Returns + ------- If enabled, returns the current tracked statistics. If disabled, returns None. """ @@ -94,8 +94,8 @@ def push_statistics() -> Optional[Statistics]: If statistics are disabled (the current memory resource is not an instance of StatisticsResourceAdaptor), this function is a no-op. - Return - ------ + Returns + ------- If enabled, returns the current tracked statistics _before_ the pop. If disabled, returns None. """ @@ -114,8 +114,8 @@ def pop_statistics() -> Optional[Statistics]: If statistics are disabled (the current memory resource is not an instance of StatisticsResourceAdaptor), this function is a no-op. - Return - ------ + Returns + ------- If enabled, returns the popped counters. If disabled, returns None. """ @@ -232,8 +232,8 @@ def report( ordered_by Sort the statistics by this attribute. - Return - ------ + Returns + ------- The pretty formatted string of the memory statistics """ @@ -279,8 +279,8 @@ def _get_descriptive_name_of_object(obj: object) -> str: obj Object in question - Return - ------ + Returns + ------- A string including filename, line number, and object name. """ From 530e03a63676be6b98a486d5914d30ce07a0d223 Mon Sep 17 00:00:00 2001 From: Lawrence Mitchell Date: Wed, 9 Oct 2024 08:28:43 +0000 Subject: [PATCH 2/2] Update cross-link to cuda-python object - Closes #1698 --- python/rmm/rmm/pylibrmm/device_buffer.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/rmm/rmm/pylibrmm/device_buffer.pyx b/python/rmm/rmm/pylibrmm/device_buffer.pyx index 76fbceef8..c2e95e845 100644 --- a/python/rmm/rmm/pylibrmm/device_buffer.pyx +++ b/python/rmm/rmm/pylibrmm/device_buffer.pyx @@ -156,7 +156,7 @@ cdef class DeviceBuffer: device : optional The CUDA device to which to prefetch the memory for this buffer. Defaults to the current CUDA device. To prefetch to the CPU, pass - :py:attr:`~cuda.cudart.cudaCpuDeviceId` as the device. + :py:attr:`~cuda.bindings.runtime.cudaCpuDeviceId` as the device. stream : optional CUDA stream to use for prefetching. Defaults to self.stream """