-
Notifications
You must be signed in to change notification settings - Fork 643
Expand file tree
/
Copy path.coderabbit.yaml
More file actions
113 lines (104 loc) · 5 KB
/
Copy path.coderabbit.yaml
File metadata and controls
113 lines (104 loc) · 5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
reviews:
profile: chill
high_level_summary: true
high_level_summary_in_walkthrough: true
poem: false
auto_review:
enabled: true
drafts: false
base_branches:
- "^main$"
- "^release/.*"
- "^hotfix/.*"
ignore_usernames: ["rapids-bot", "GPUtester", "nv-automation-bot", "copy-pr-bot"]
tools:
markdownlint:
enabled: true
shellcheck:
enabled: true
gitleaks:
enabled: true
sequence_diagrams: false
collapse_walkthrough: true
# Reduce noise from status messages
request_changes_workflow: false
review_status: false
# Path-specific review instructions
# Note: Detailed C++/CUDA and Python review guidelines are in cpp/agents.md and python/agents.md
path_instructions:
- path: "docs/**/*"
instructions: |
For documentation changes, focus on:
- Accuracy: Verify code examples compile and run correctly
- Completeness: Check if API changes (parameters, return values, errors) are documented
- Clarity: Flag confusing explanations, missing prerequisites, or unclear examples
- Consistency: Version numbers, parameter types, and terminology match code
- Missing docs: If PR changes public APIs without updating docs, flag as HIGH priority
- path: "cpp/include/cuml/**/*"
instructions: |
For public C++ API headers, additionally check:
- Doxygen documentation for all public functions/classes
- API changes flagged for docs/ updates
- Breaking changes require deprecation warnings and migration guide updates
- path: "cpp/{src,src_prims,include}/**/*.{cu,cuh,cpp,hpp,h}"
instructions: |
For C++/CUDA host-side size and shape arithmetic, flag the following as
HIGH priority (see cpp/agents.md "Integer arithmetic for sizes, launches,
and host indexing"):
- Multiplications, additions, subtractions, or divisions of `int` (or
any sub-`size_t` integer) whose result is passed to:
`rmm::device_uvector` ctor or `.resize(...)`, `cudaMalloc*`, any
`*allocator*.allocate(...)`, `dim3(...)`, `cuda::std::span` /
`raft::span` construction, or used as a `size_t`/`int64_t` parameter.
Require the appropriate helper from
`cpp/include/cuml/common/checked_arithmetic.hpp`:
* `ML::checked_mul<size_t>(...)` for products
* `ML::checked_add<size_t>(...)` for sums / cumulative offsets
* `ML::checked_sub<size_t>(...)` for differences used as lengths
* `ML::checked_div<size_t>(...)` for quotients whose divisor is
not statically non-zero (including ceil-div for launch dims)
or equivalent widening + explicit guard at the call site.
- Silent narrowing of a wider integer type into a narrower one for
a count, index, or dimension — e.g. `int n = c.size();`,
`int n = m_shape.first;`, or passing a `size_t` to a function
parameter typed `int`. Require `ML::narrow_cast<int>(...)` (which
traps if the value does not fit, including negative-to-unsigned
sign loss) or widening the receiver / API.
- Public estimator entry points (anything reachable from cython/pylibraft
bindings) that accept count-like `int` parameters without an
upper-bound / shape validation step before allocations or launches.
- `int * int` or `int + int` expressions used to compute grid/block
dimensions for kernel launches. Require widening to `size_t` and a
check against device launch limits where the product can plausibly
exceed 2^31.
- A value passed directly to a `<<<grid, block, ...>>>` launch that
relies on an implicit conversion to `unsigned int`. Require
`ML::narrow_cast<ML::cuda_launch_t>(...)` for grid/block dimensions
so the conversion is checked and the call site is explicit.
Do not flag arithmetic that is purely inside `__device__` / `__global__`
code — the rule is host-side only. Performance-sensitive kernel bodies
are intentionally out of scope.
- path: "notebooks/**/*"
instructions: |
For example notebooks:
- Verify code examples match current API (parameter names, return types)
- Ensure scikit-learn comparison examples are accurate
- Flag outdated imports or deprecated API usage
- path: "ci/**/*"
instructions: |
For CI/build scripts:
- Check for proper conda environment handling
- Verify GPU availability checks before tests
- Check for proper error handling and meaningful error messages
knowledge_base:
opt_out: false
code_guidelines:
filePatterns:
- "cpp/agents.md"
- "python/agents.md"
- "CONTRIBUTING.md"
- "wiki/cpp/DEVELOPER_GUIDE.md"
- "wiki/python/DEVELOPER_GUIDE.md"
- "wiki/python/ESTIMATOR_GUIDE.md"