Skip to content

Commit 4fccf6e

Browse files
committed
Merge origin/main into graph-builder-refactor
2 parents 1aec3e5 + ea0215f commit 4fccf6e

66 files changed

Lines changed: 12506 additions & 622 deletions

Some content is hidden

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

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

.github/workflows/build-wheel.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,16 @@ jobs:
462462
cuda-version: ${{ inputs.prev-cuda-version }}
463463
cuda-path: "./cuda_toolkit_prev"
464464

465+
- name: Build cuda.core test binaries
466+
run: bash ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.sh
467+
468+
- name: Upload cuda.core test binaries
469+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
470+
with:
471+
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
472+
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/*.o
473+
if-no-files-found: error
474+
465475
- name: Download cuda.bindings build artifacts from the prior branch
466476
env:
467477
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-wheel-linux.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,19 @@ jobs:
279279
pwd
280280
ls -lahR $CUDA_CORE_CYTHON_TESTS_DIR
281281
282+
- name: Download cuda.core test binaries
283+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
284+
with:
285+
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
286+
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}
287+
run-id: ${{ inputs.run-id || github.run_id }}
288+
github-token: ${{ secrets.GITHUB_TOKEN }}
289+
290+
- name: Display structure of downloaded cuda.core test binaries
291+
run: |
292+
pwd
293+
ls -lahR $CUDA_CORE_TEST_BINARIES_DIR
294+
282295
- name: Set up Python ${{ matrix.PY_VER }}
283296
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
284297
with:

.github/workflows/test-wheel-windows.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,19 @@ jobs:
259259
Get-Location
260260
Get-ChildItem -Recurse -Force $env:CUDA_CORE_CYTHON_TESTS_DIR | Select-Object Mode, LastWriteTime, Length, FullName
261261
262+
- name: Download cuda.core test binaries
263+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
264+
with:
265+
name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries
266+
path: ${{ env.CUDA_CORE_TEST_BINARIES_DIR }}
267+
run-id: ${{ inputs.run-id || github.run_id }}
268+
github-token: ${{ secrets.GITHUB_TOKEN }}
269+
270+
- name: Display structure of downloaded cuda.core test binaries
271+
run: |
272+
Get-Location
273+
Get-ChildItem -Recurse -Force $env:CUDA_CORE_TEST_BINARIES_DIR | Select-Object Mode, LastWriteTime, Length, FullName
274+
262275
- name: Set up Python ${{ matrix.PY_VER }}
263276
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
264277
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ cache_driver
1919
cache_runtime
2020
cache_nvrtc
2121

22+
# cuda.core test object fixtures built locally / downloaded as CI artifacts
23+
cuda_core/tests/test_binaries/*.o
24+
2225
# CUDA Python specific (auto-generated)
2326
cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd
2427
cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
language: python
3333
additional_dependencies:
3434
- https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl
35-
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)'
35+
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)'
3636
args: ["--fix"]
3737

3838
- id: no-markdown-in-docs-source
@@ -111,6 +111,7 @@ repos:
111111
alias: mypy-cuda-core
112112
name: mypy-cuda-core
113113
files: ^cuda_core/cuda/.*\.(py|pyi)$
114+
exclude: ^cuda_core/cuda/core/_vendored/
114115
pass_filenames: false
115116
args: [--config-file=cuda_core/pyproject.toml, cuda_core/cuda/core]
116117
additional_dependencies:

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,44 @@ repos/{owner}/{repo}/milestones --jq '.[].title'`, and pick the best match.
113113
end on clarifications unless truly blocked. Every rollout should conclude
114114
with a concrete edit or an explicit blocker plus a targeted question.
115115

116+
## Test authorship markers
117+
118+
Use pytest markers to make the provenance of newly added unit tests explicit.
119+
Keep this provenance system minimal: choose from only these three markers.
120+
Place the marker immediately above each test function. A class-level marker is
121+
acceptable only when every test method in the class has the same provenance.
122+
Do not use module-level `pytestmark` for authorship provenance; it is too easy
123+
to miss in large files and makes later per-test provenance changes ambiguous.
124+
125+
- `@pytest.mark.agent_authored(model="<model>")`: the test was authored by an
126+
agent and has not yet been materially reviewed or rewritten by a human.
127+
Agents must add this marker when generating new unit tests, for example:
128+
129+
```python
130+
import pytest
131+
132+
@pytest.mark.agent_authored(model="gpt-5.5")
133+
def test_something():
134+
...
135+
```
136+
137+
- `@pytest.mark.human_reviewed`: a human has materially reviewed or rewritten
138+
an agent-authored test. Prefer replacing
139+
`@pytest.mark.agent_authored(model="<model>")` with this marker instead of
140+
keeping both.
141+
- `@pytest.mark.human_authored`: the test was authored by a human, or
142+
rewritten enough that the authorship is primarily human.
143+
144+
Use at most one authorship marker per test. Treat missing markers as legacy or
145+
unknown provenance, not as implicit `@pytest.mark.human_authored`. Because
146+
these are pytest markers, tests can be selected with `pytest -m`, for example
147+
`pytest -m agent_authored`.
148+
149+
When an agent notices a human adding a new test or materially modifying an
150+
existing test, suggest adding `@pytest.mark.human_authored` or replacing
151+
`@pytest.mark.agent_authored(model="<model>")` with
152+
`@pytest.mark.human_reviewed` as appropriate.
153+
116154

117155
# Editing constraints
118156

ci/tools/env-vars

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-${HOST_
3434
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${SHA}"
3535
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "${REPO_DIR}/cuda_core/dist")"
3636
echo "CUDA_CORE_CYTHON_TESTS_DIR=$(realpath "${REPO_DIR}/cuda_core/tests/cython")"
37+
echo "CUDA_CORE_TEST_BINARIES_DIR=$(realpath "${REPO_DIR}/cuda_core/tests/test_binaries")"
3738
echo "PYTHON_VERSION_FORMATTED=${PYTHON_VERSION_FORMATTED}"
3839
} >> $GITHUB_ENV
3940

ci/tools/tests/test_fetch_ctk_redistrib.py

Lines changed: 0 additions & 221 deletions
This file was deleted.

cuda_bindings/AGENTS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ subpackage in the `cuda-python` monorepo.
4444
- run: `pytest tests/cython/`
4545
- **Examples**: example coverage is pytest-based under `examples/`.
4646
- **Benchmarks**: run with `pytest --benchmark-only benchmarks/` when needed.
47-
- **Orchestrated run**: from repo root, `scripts/run_tests.sh bindings`.
4847

4948
## Build and environment notes
5049

0 commit comments

Comments
 (0)