Skip to content

Commit

Permalink
Release 0.9.6 (#128)
Browse files Browse the repository at this point in the history
* rapids-update

* rapids-update

* add mm docs

* mm update

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update code

* update mm

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
Intron7 and pre-commit-ci[bot] authored Feb 23, 2024
1 parent 7e70952 commit dc43ac2
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Our commitment with rapids-singlecell is to deliver a powerful, user-centric too
### Conda
The easiest way to install *rapids-singlecell* is to use one of the *yaml* file provided in the [conda](https://github.com/scverse/rapids_singlecell/tree/main/conda) folder. These *yaml* files install everything needed to run the example notbooks and get you started.
```
conda env create -f conda/rsc_rapids_23.04.yml
conda env create -f conda/rsc_rapids_24.02.yml
# or
mamba env create -f conda/rsc_rapids_23.12.yml
```
Expand Down
6 changes: 3 additions & 3 deletions ci/rsc_test_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ channels:
- nvidia
- conda-forge
dependencies:
- cudf=23.12
- cuml=23.12
- cugraph=23.12
- cudf=24.02
- cuml=24.02
- cugraph=24.02
- python=3.10
- cuda-version=11.8
- cudnn
Expand Down
5 changes: 2 additions & 3 deletions conda/rsc_rapids_23.04.yml → conda/rsc_rapids_24.02.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ channels:
- conda-forge
- bioconda
dependencies:
- rapids=23.04
- rapids=24.02
- python=3.10
- cudatoolkit=11.8
- cuda-version=11.8
- cudnn
- cutensor
- cusparselt
Expand All @@ -17,7 +17,6 @@ dependencies:
- jupyterlab
- pip
- pip:
- scanpy
- decoupler
- omnipath
- gdown
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
## Conda
The easiest way to install *rapids-singlecell* is to use one of the *yaml* file provided in the [conda](https://github.com/scverse/rapids_singlecell/tree/main/conda) folder. These *yaml* files install everything needed to run the example notebooks and get you started.
```
conda env create -f conda/rsc_rapids_23.04.yml
conda env create -f conda/rsc_rapids_24.02.yml
# or
mamba env create -f conda/rsc_rapids_23.12.yml
```
Expand Down
42 changes: 42 additions & 0 deletions docs/MM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Memory Management

In rapids-singlecell, efficient memory management is crucial for handling large-scale datasets. This is facilitated by the integration of the RAPIDS Memory Manager ({mod}`rmm`). {mod}`rmm` is automatically invoked upon importing `rapids-singlecell`, modifying the default allocator for cupy. Integrating {mod}`rmm` with `rapids-singlecell` slightly modifies the execution speed of {mod}`cupy`. This change typically results in a minimal performance trade-off. However, it's crucial to be aware that certain specific functions, like {func}`~.pp.harmony_integrate`, might experience a more significant impact on performance efficiency due to this integration. Users can overwrite the default behavior with {func}`rmm.reinitialize`.

## Managed Memory

In {mod}`rmm`, the `managed_memory` feature facilitates VRAM oversubscription, allowing for the processing of data structures larger than the default VRAM capacity. This effectively extends the memory limit up to twice the VRAM size. Leveraging managed memory will introduce a performance overhead. This is particularly evident with substantial oversubscription, as it necessitates increased dependency on the comparatively slower system memory, leading to slowdowns in data processing tasks.

```
# Enable `managed_memory`
import rmm
from rmm.allocators.cupy import rmm_cupy_allocator
rmm.reinitialize(
managed_memory=True,
pool_allocator=False,
)
cp.cuda.set_allocator(rmm_cupy_allocator)
```

## Pool Allocator

The `pool_allocator` functionality in {mod}`rmm` optimizes memory handling by pre-allocating a pool of memory, which can be swiftly accessed for GPU-related tasks. This approach, while being more memory-intensive, significantly boosts performance. It is particularly beneficial for operations that are heavy on memory usage, such as {func}`~.pp.harmony_integrate`, by minimizing the time spent on dynamic memory allocation during runtime.

```
# Enable `pool_allocator`
import rmm
from rmm.allocators.cupy import rmm_cupy_allocator
rmm.reinitialize(
managed_memory=False,
pool_allocator=True,
)
cp.cuda.set_allocator(rmm_cupy_allocator)
```

## Best Practices
To achieve optimal memory management in rapids-singlecell, consider the following guidelines:

* **Large-scale Data Analysis:** Utilize `managed_memory` for datasets exceeding your VRAM's capacity, keeping in mind the potential performance penalties.
* **Performance-Critical Operations:** Choose `pool_allocator` when speed is critical and sufficient VRAM is available.

## Further Reading
For a more in-depth understanding of rmm and its functionalities, refer to the [RAPIDS Memory Manager documentation](https://docs.rapids.ai/api/rmm/stable/python/).
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
Installation.md
Usage_Principles.md
api/index.md
MM.md
release-notes/index.md
references.md
notebooks.rst
Expand Down
6 changes: 5 additions & 1 deletion docs/release-notes/0.9.6.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
### 0.9.6 {small}`The Future`
### 0.9.6 {small}

```{rubric} Bug fixes
```
* {func}`~rapids_singlecell.tl.louvain` and {func}`~rapids_singlecell.tl.leiden` now works with next version of scanpy {pr}`127` {smaller}`S Dicks`

```{rubric} Misc
```
* Updates Conda yaml file to work with rapids-24.02 {pr}`128` {smaller}`S Dicks`

0 comments on commit dc43ac2

Please sign in to comment.