Skip to content

Commit 06c97df

Browse files
committed
Address AGENTS review feedback
1 parent 340fd6c commit 06c97df

3 files changed

Lines changed: 22 additions & 19 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ across the repository, in addition to any package-specific `AGENTS.md`.
3838
- Add targeted regression tests for behavioral fixes. Do not add elaborate
3939
tests that mostly prove an implementation detail or require large module
4040
stubbing unless that is the only practical way to cover the bug.
41-
- Do not weaken tests just to pass a platform or CI configuration. Avoid broad
42-
platform skips such as "skip all WSL" or "skip all Windows"; query CUDA
43-
driver/device capability or the specific missing library/feature instead.
41+
- Do not weaken tests just to pass a platform or CI configuration. Use the
42+
tightest available skip criteria: broad OS skips are appropriate only when
43+
upstream documentation or the support matrix says the feature is unsupported
44+
on that OS; otherwise query the specific CUDA driver/device capability or
45+
missing library/feature.
4446
- Preserve real user workflows in tests. Do not change global CUDA state, skip
4547
real loading paths, or disable release-note/doc checks merely to reduce CI
4648
load unless reviewers have agreed to that behavior change.
@@ -53,9 +55,9 @@ across the repository, in addition to any package-specific `AGENTS.md`.
5355
- Do not hand-edit generated binding artifacts as a shortcut. Fix the generator
5456
source or templates and regenerate/sync outputs so the next generation does
5557
not reintroduce the same review issue.
56-
- Lint or formatting changes that touch generated files should either be made
57-
in the generator (`cython-gen`, `cybind`, templates, or sync source) or should
58-
exclude generated outputs from the check.
58+
- Use `.pre-commit-config.yaml` as the source of truth for linting and
59+
formatting. Do not perform formatting or lint fixes on files marked "This code
60+
was automatically generated..." unless the repo config explicitly opts them in.
5961
- Keep builds working across the supported CUDA major versions. Do not cimport
6062
or call newly generated Cython symbols directly unless the older supported
6163
CUDA-major build is gated or has a wrapper/fallback path.

cuda_bindings/AGENTS.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ subpackage in the `cuda-python` monorepo.
3535
defined in `build_hooks.py`; update those rules when introducing new symbols.
3636
- **Platform split files**: keep `_linux.pyx` and `_windows.pyx` variants
3737
aligned when behavior should be equivalent.
38-
- **Lint at the source**: if formatting or lint fixes affect generated files,
39-
make the fix in the generation source (`cython-gen`, `cybind`, templates, or
40-
sync source) or exclude generated outputs from the check. Otherwise the next
41-
regeneration will reintroduce the same issue.
38+
- **Don't lint generated files:** If a file has the comment "This code was
39+
automatically generated...", do not perform any formatting or lint fixes.
4240
- **Cython copies**: prefer typed assignment for wrapper-owned C struct copies
4341
over raw `memcpy` when the generated Cython/C types can define the copy size.
4442

@@ -76,5 +74,5 @@ subpackage in the `cuda-python` monorepo.
7674
through an existing Python wrapper instead of directly cimporting the new
7775
generated Cython symbol.
7876
- For external contributions touching generated `cuda_bindings` code, ask for a
79-
reproducer and environment details, then route fixes through the generation
80-
source rather than accepting one-off generated edits.
77+
reproducer and environment details. Do not accept one-off generated edits;
78+
NVIDIA maintainers should route accepted fixes through the generation source.

cuda_core/AGENTS.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ This file describes `cuda_core`, the high-level Pythonic CUDA subpackage in the
77
`Program`, `Linker`, memory resources, graphs) on top of `cuda.bindings`.
88
- **API intent**: keep interfaces Pythonic while preserving explicit CUDA
99
behavior and error visibility.
10-
- **Compatibility**: changes should remain compatible with supported
11-
`cuda.bindings` major versions (12.x and 13.x).
10+
- **API stability**: `cuda_core` is v1.0+; avoid breaking public APIs. Prefer
11+
compatibility/deprecation paths and document intentional public changes in
12+
docs and release notes.
13+
- **Compatibility**: changes should remain compatible with the supported CUDA
14+
major-version matrix.
1215

1316
## Package architecture
1417

@@ -65,14 +68,14 @@ This file describes `cuda_core`, the high-level Pythonic CUDA subpackage in the
6568
- If you change public behavior, update tests and docs under `docs/source/`.
6669
- For new public APIs or broad feature work, sketch the API and behavior in an
6770
issue/design discussion before opening a large implementation PR. Reviewers
68-
often block major `cuda_core` features until API shape, examples, and
69-
docs/release-note coverage are clear.
71+
often block major `cuda_core` features until API shape, compatibility impact,
72+
examples, and docs/release-note coverage are clear.
7073
- Feature availability checks should query CUDA driver/device capabilities
7174
instead of hard-coding broad platform skips. Prefer properties such as
7275
capability flags over assumptions like "Windows", "Linux", or "WSL".
73-
- Keep CUDA 12.x and 13.x build compatibility in mind. Do not directly cimport
74-
newly generated binding symbols unless older supported CUDA-major builds are
75-
gated or have a wrapper/fallback path.
76+
- Preserve compatibility with the supported CUDA major-version matrix. Do not
77+
directly cimport newly generated binding symbols unless older supported
78+
CUDA-major builds are gated or have a wrapper/fallback path.
7679
- Resource and context-manager code must preserve stream ordering, ownership,
7780
and exception semantics. `close()`/cleanup paths should use the stream that
7881
established the resource ordering, and `__exit__` should avoid masking a

0 commit comments

Comments
 (0)