Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt711 committed Oct 1, 2024
1 parent 344d3b4 commit 30b4ebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/rmm/docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,17 @@ Common to both usages is that they modify the currently active RMM memory resour

>>> # We start with the default cuda memory resource
>>> rmm.mr.get_current_device_resource()
<rmm._lib.memory_resource.CudaMemoryResource at 0x7f7e6c0a1ce0>
<rmm.pylibrmm.memory_resource.CudaMemoryResource object at 0x7fa0da48a8e0>

>>> # When using statistics, we get a StatisticsResourceAdaptor with the context
>>> with rmm.statistics.statistics():
... rmm.mr.get_current_device_resource()
<rmm._lib.memory_resource.StatisticsResourceAdaptor at 0x7f7e6c524900>
<rmm.pylibrmm.memory_resource.StatisticsResourceAdaptor object at 0x7fa0dd6e4a40>

>>> # We can also enable statistics globally
>>> rmm.statistics.enable_statistics()
>>> print(rmm.mr.get_current_device_resource())
<rmm._lib.memory_resource.StatisticsResourceAdaptor at 0x7f662c2bb3c0>
<rmm.pylibrmm.memory_resource.StatisticsResourceAdaptor object at 0x7f9a11340a40>
```

With statistics enabled, you can query statistics of the current and peak bytes and number of allocations performed by the current RMM memory resource:
Expand Down

0 comments on commit 30b4ebc

Please sign in to comment.