Skip to content

Commit 6d7612e

Browse files
authored
Merge branch 'main' into get-ready-for-64-bit-indptr
2 parents df69917 + b7e6577 commit 6d7612e

96 files changed

Lines changed: 4332 additions & 625 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 10 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ reviews:
1010
request_changes_workflow: false
1111
review_status: false
1212
auto_review:
13-
enabled: true
13+
enabled: false
1414
drafts: false
1515
base_branches:
1616
- "^main$"
@@ -23,45 +23,21 @@ reviews:
2323
enabled: true
2424
path_instructions:
2525
- path: "src/rapids_singlecell/_cuda/**"
26-
instructions: |
27-
These are nanobind CUDA C++ kernels. Pay close attention to:
28-
- Shared memory usage and device limits
29-
- Thread/block configuration
30-
- Memory access patterns and coalescing
31-
- Correct use of atomicAdd and synchronization
32-
- Template parameter correctness (float vs double)
33-
- MANDATORY: Every kernel launch (<<<grid, block, shared, stream>>>) MUST be followed by cudaGetLastError() to catch launch failures. Flag any kernel launch missing this check.
34-
- MANDATORY: No magic numbers. All block sizes, tile sizes, grid calculations, and thresholds must use named constants (constexpr int BLOCK_SIZE = 256). Flag any raw numeric literal in dim3, grid, or shared memory calculations.
35-
- path: "src/rapids_singlecell/**/_kernels/**"
36-
instructions: |
37-
These are CuPy RawKernel definitions. Review for:
38-
- Correct CUDA kernel launch configurations
39-
- Shared memory bounds
40-
- Type safety (float32 vs float64 mismatches)
41-
- No magic numbers in kernel launch configurations or kernel code. Block sizes, tile sizes, and thresholds must use named constants.
42-
- After RawKernel calls, check for cp.cuda.runtime.getLastError() to catch silent launch failures.
26+
instructions: "Nanobind CUDA C++ kernels. See knowledge base for detailed review guidelines."
27+
- path: "src/rapids_singlecell/**"
28+
instructions: "GPU-accelerated Python. See knowledge base for detailed review guidelines."
4329
- path: "tests/**"
44-
instructions: |
45-
Do not suggest changing test tolerances without strong justification.
46-
Tests run on GPU; some numerical differences vs CPU are expected.
30+
instructions: "GPU tests — do not suggest tolerance changes without strong justification."
4731
- path: "docs/**"
48-
instructions: |
49-
For documentation changes, focus on:
50-
- Accuracy of code examples
51-
- Completeness of API documentation
52-
- Consistency with current code
32+
instructions: "Check accuracy of code examples and consistency with current code."
5333
- path: ".github/**"
54-
instructions: |
55-
For CI/workflow changes:
56-
- Check for proper error handling
57-
- Verify GPU availability checks before tests
58-
- Watch for semicolon issues in CMAKE_CUDA_ARCHITECTURES
34+
instructions: "CI workflows — watch for semicolon issues in CMAKE_CUDA_ARCHITECTURES."
5935
knowledge_base:
6036
opt_out: false
6137
code_guidelines:
6238
filePatterns:
63-
- "python_agents.md"
64-
- "cuda_agents.md"
39+
- ".coderabbit/python_agents.md"
40+
- ".coderabbit/cuda_agents.md"
6541
- "docs/contributing.md"
6642
chat:
67-
auto_reply: true
43+
auto_reply: false
File renamed without changes.
File renamed without changes.

.github/workflows/docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
strategy:
7272
matrix:
7373
RAPIDS_VER:
74-
- "26.02"
74+
- "26.04"
7575
CUDA_SUFFIX:
7676
- { ver: "12.8.0", label: "cuda12", pkg: "cu12" }
7777
- { ver: "13.0.2", label: "cuda13", pkg: "cu13" }
@@ -143,6 +143,7 @@ jobs:
143143
labels: ${{ steps.meta-base.outputs.labels }}
144144
build-args: |
145145
CUDA_VER=${{ matrix.CUDA_SUFFIX.ver }}
146+
GIT_ID=${{ github.event.pull_request.head.sha || github.sha }}
146147
#cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-deps
147148

148149
- name: Generate artifact attestation for base image
@@ -171,6 +172,7 @@ jobs:
171172
labels: ${{ steps.meta.outputs.labels }}
172173
build-args: |
173174
CUDA_ARCHS=${{ matrix.CUDA_SUFFIX.label == 'cuda12' && '75-real;80-real;86-real;89-real;90' || '75-real;80-real;86-real;89-real;90-real;100-real;120' }}
175+
GIT_ID=${{ github.event.pull_request.head.sha || github.sha }}
174176
#cache-from: type=registry,ref=ghcr.io/${{ github.repository }}
175177
build-contexts: |
176178
rapids-singlecell-deps=docker-image://${{ fromJSON(steps.meta-base.outputs.json).tags[0] }}

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ jobs:
106106
uses: pypa/cibuildwheel@v3.1.4
107107
env:
108108
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ steps.version.outputs.version }}
109+
CIBW_BUILD: 'cp312-*'
109110
CIBW_SKIP: '*-musllinux*'
110111
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.os == 'linux-intel' && matrix.cibw_image || '' }}
111112
CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.os == 'linux-arm' && matrix.cibw_image || '' }}

.github/workflows/test-gpu.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- id: get-envs
3939
run: |
4040
# Stable and dev environments
41-
STABLE_DEV_JSON=$(uvx --with "virtualenv<21" hatch env show --json | jq -c '
41+
STABLE_DEV_JSON=$(uvx --from "hatch==1.16.5" hatch env show --json | jq -c '
4242
to_entries
4343
| map(
4444
select(.key | startswith("hatch-test") and endswith("12") and (contains("prerelease") | not))
@@ -50,7 +50,7 @@ jobs:
5050
echo "stable-dev=${STABLE_DEV_JSON}" | tee -a $GITHUB_OUTPUT
5151
5252
# Prerelease environments
53-
PRERELEASE_JSON=$(uvx --with "virtualenv<21" hatch env show --json | jq -c '
53+
PRERELEASE_JSON=$(uvx --from "hatch==1.16.5" hatch env show --json | jq -c '
5454
to_entries
5555
| map(
5656
select(.key | startswith("hatch-test") and endswith("12") and contains("prerelease"))
@@ -89,18 +89,18 @@ jobs:
8989
echo "LD_LIBRARY_PATH=/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
9090
9191
- name: Install dependencies
92-
run: uvx --with "virtualenv<21" hatch -v env create ${{ matrix.env.name }}
92+
run: uvx --from "hatch==1.16.5" hatch -v env create ${{ matrix.env.name }}
9393

9494
- name: Run tests
9595
run: |
9696
mkdir -p test-data
9797
if [[ "${{ matrix.env.name }}" == *"stable"* ]]; then
98-
uvx --with "virtualenv<21" hatch run ${{ matrix.env.name }}:run-cov -v --color=yes
99-
uvx --with "virtualenv<21" hatch run ${{ matrix.env.name }}:coverage xml
100-
uvx --with "virtualenv<21" hatch run ${{ matrix.env.name }}:cov-report
98+
uvx --from "hatch==1.16.5" hatch run ${{ matrix.env.name }}:run-cov -v --color=yes
99+
uvx --from "hatch==1.16.5" hatch run ${{ matrix.env.name }}:coverage xml
100+
uvx --from "hatch==1.16.5" hatch run ${{ matrix.env.name }}:cov-report
101101
102102
else
103-
uvx --with "virtualenv<21" hatch run ${{ matrix.env.name }}:run -v --color=yes
103+
uvx --from "hatch==1.16.5" hatch run ${{ matrix.env.name }}:run -v --color=yes
104104
fi
105105
106106
- name: Upload test results
@@ -157,10 +157,10 @@ jobs:
157157
run: nvidia-smi
158158

159159
- name: Install dependencies
160-
run: uvx --with "virtualenv<21" hatch -v env create ${{ matrix.env.name }}
160+
run: uvx --from "hatch==1.16.5" hatch -v env create ${{ matrix.env.name }}
161161

162162
- name: Run tests
163-
run: uvx --with "virtualenv<21" hatch run ${{ matrix.env.name }}:run -v --color=yes
163+
run: uvx --from "hatch==1.16.5" hatch run ${{ matrix.env.name }}:run -v --color=yes
164164

165165
remove-label:
166166
name: Remove 'run-gpu-ci' Label

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ __pycache__/
44
/*cache/
55
.ipynb_checkpoints/
66
/data/
7+
/benchmarks/
78
test-data/
89
.vscode/
910

@@ -46,6 +47,7 @@ coverage.xml
4647
.vscode/
4748
.cursor/
4849
.claude/
50+
.codex
4951
CLAUDE.md
5052

5153
# tmp_scripts

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.15.6
3+
rev: v0.15.12
44
hooks:
55
- id: ruff-check
66
args: ["--fix"]
@@ -37,7 +37,7 @@ repos:
3737
docs/references.bib|
3838
)
3939
- repo: https://github.com/pre-commit/mirrors-clang-format
40-
rev: v22.1.1
40+
rev: v22.1.5
4141
hooks:
4242
- id: clang-format
4343
args: [--style=file, -i]

.readthedocs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ build:
1616
- asdf global uv latest
1717
build:
1818
html:
19-
# pin virtualenv<21 to work around https://github.com/pypa/hatch/issues/2193
20-
- CMAKE_ARGS="-DRSC_BUILD_EXTENSIONS=OFF" uvx --with "virtualenv<21" hatch run docs:build
19+
- CMAKE_ARGS="-DRSC_BUILD_EXTENSIONS=OFF" uvx --from "hatch==1.16.5" hatch run docs:build
2120
- mv docs/_build $READTHEDOCS_OUTPUT

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ if (RSC_BUILD_EXTENSIONS)
7171
add_nb_cuda_module(_qc_dask_cuda src/rapids_singlecell/_cuda/qc_dask/qc_kernels_dask.cu)
7272
add_nb_cuda_module(_bbknn_cuda src/rapids_singlecell/_cuda/bbknn/bbknn.cu)
7373
add_nb_cuda_module(_norm_cuda src/rapids_singlecell/_cuda/norm/norm.cu)
74+
add_nb_cuda_module(_gmm_cuda src/rapids_singlecell/_cuda/gmm/gmm.cu)
75+
target_link_libraries(_gmm_cuda PRIVATE CUDA::cublas)
7476
add_nb_cuda_module(_pr_cuda src/rapids_singlecell/_cuda/pr/pr.cu)
7577
add_nb_cuda_module(_nn_descent_cuda src/rapids_singlecell/_cuda/nn_descent/nn_descent.cu)
7678
add_nb_cuda_module(_aucell_cuda src/rapids_singlecell/_cuda/aucell/aucell.cu)

0 commit comments

Comments
 (0)