Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.4
rev: v0.16.5
hooks:
- id: ruff-check
args: ["--fix"]
Expand Down Expand Up @@ -33,7 +33,7 @@ repos:
docs/references.bib|
)
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v22.1.8
rev: v23.1.0
hooks:
- id: clang-format
args: [--style=file, -i]
Expand Down
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ The `add_nb_cuda_module` helper automatically handles:
```python
from rapids_singlecell._cuda import _my_module_cuda as _my


def my_function(adata):
# _my is either the real module or None
_my.kernel(...)
Expand Down
2 changes: 1 addition & 1 deletion docs/gpu_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ AnnData stores {attr}`~anndata.AnnData.raw` in CPU memory, even when `.X` was al
rsc.get.anndata_to_GPU(adata)
adata.raw = adata.copy()

print(type(adata.X)) # CuPy or cupyx: GPU
print(type(adata.X)) # CuPy or cupyx: GPU
print(type(adata.raw.X)) # NumPy or SciPy: CPU
```

Expand Down
1 change: 1 addition & 0 deletions docs/memory_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ cp.cuda.set_allocator(rmm_cupy_allocator)
import rmm
import cupy as cp
from rmm.allocators.cupy import rmm_cupy_allocator

rmm.reinitialize(
managed_memory=False,
pool_allocator=True,
Expand Down
14 changes: 7 additions & 7 deletions docs/out_of_core.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ from dask_cuda import LocalCUDACluster
cluster = LocalCUDACluster(
CUDA_VISIBLE_DEVICES="0,1,2,3,4,5,6,7",
protocol="ucx",
threads_per_worker=1, # GPU-safe default
rmm_pool_size="80%", # per-worker pool; % of free VRAM at start
rmm_managed_memory=False, # avoid UM to maximize P2P
threads_per_worker=1, # GPU-safe default
rmm_pool_size="80%", # per-worker pool; % of free VRAM at start
rmm_managed_memory=False, # avoid UM to maximize P2P
rmm_allocator_external_lib_list=["cupy"], # auto-patch CuPy to use RMM
)
client = Client(cluster)
Expand All @@ -36,10 +36,10 @@ from dask.distributed import Client
from dask_cuda import LocalCUDACluster

cluster = LocalCUDACluster(
CUDA_VISIBLE_DEVICES="0,1", # scale as needed
protocol="tcp", # TCP is often more predictable with UVM
CUDA_VISIBLE_DEVICES="0,1", # scale as needed
protocol="tcp", # TCP is often more predictable with UVM
threads_per_worker=1,
rmm_managed_memory=True, # allow oversubscription (paging)
rmm_managed_memory=True, # allow oversubscription (paging)
rmm_allocator_external_lib_list=["cupy"],
)
client = Client(cluster)
Expand Down Expand Up @@ -85,6 +85,7 @@ adata = ad.AnnData(

```python
import rapids_singlecell as rsc

rsc.get.anndata_to_GPU(adata)
# Normalize and transform
rsc.pp.normalize_total(adata)
Expand All @@ -106,7 +107,6 @@ Most functions operate lazily; use `.compute()` only when you need concrete valu
```python
# Dense dask+cupy matrix → cupy
X_gpu = adata.X.compute()

```

## Persist and chunk sizes
Expand Down
2 changes: 1 addition & 1 deletion docs/usage_principles.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ from rapids_singlecell import ptg
distance = ptg.Distance(metric="edistance", obsm_key="X_pca")
result = distance.pairwise(adata, groupby="perturbation")
res, res_var = distance.pairwise(
adata, groupby="perturbation", bootstrap=True, n_bootstrap=100, multi_gpu=None
adata, groupby="perturbation", bootstrap=True, n_bootstrap=100, multi_gpu=None
)
```

Expand Down
Loading