Skip to content

Commit 91f288a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into cuda.core.system-events
2 parents 081085f + 39e3293 commit 91f288a

28 files changed

Lines changed: 804 additions & 1087 deletions

.github/workflows/backport.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,25 @@ on:
99
types: [closed, labeled]
1010
branches:
1111
- main
12+
workflow_dispatch:
13+
inputs:
14+
backport-branch:
15+
description: "Branch to backport commits onto"
16+
required: false
17+
type: string
18+
pull-request:
19+
description: "PR to backport"
20+
required: true
21+
type: number
22+
1223

1324
permissions:
1425
contents: write # so it can comment
1526
pull-requests: write # so it can create pull requests
1627

1728
jobs:
18-
backport:
19-
name: Backport pull request
29+
backport-from-pr:
30+
name: Backport directly from a pull request
2031
if: ${{ github.repository_owner == 'nvidia' &&
2132
github.event.pull_request.merged == true &&
2233
contains( github.event.pull_request.labels.*.name, 'to-be-backported')
@@ -38,3 +49,28 @@ jobs:
3849
copy_labels_pattern: true
3950
copy_requested_reviewers: true
4051
target_branches: ${{ env.OLD_BRANCH }}
52+
backport-to-branch:
53+
name: Backport a specific PR against a specific branch
54+
if: github.repository_owner == 'nvidia' && github.event_name == 'workflow_dispatch'
55+
runs-on: ubuntu-latest
56+
steps:
57+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
58+
59+
- name: Load branch from environment name
60+
if: inputs.backport-branch == null
61+
run: |
62+
BACKPORT_BRANCH=$(yq '.backport_branch' ci/versions.yml)
63+
echo "BACKPORT_BRANCH=${BRANCH}" >> $GITHUB_ENV
64+
65+
- name: Load branch name from input
66+
if: inputs.backport-branch != null
67+
run: echo "BACKPORT_BRANCH=${{ inputs.backport-branch }}" >> $GITHUB_ENV
68+
69+
- name: Create backport pull requests
70+
uses: korthout/backport-action@c656f5d5851037b2b38fb5db2691a03fa229e3b2 # v4.0.1
71+
with:
72+
copy_assignees: true
73+
copy_labels_pattern: true
74+
copy_requested_reviewers: true
75+
target_branches: ${{ env.BACKPORT_BRANCH }}
76+
source_pr_number: ${{ inputs.pull-request }}

cuda_bindings/pixi.lock

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cuda_core/build_hooks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def get_sources(mod_name):
105105
sources = [f"cuda/core/{mod_name}.pyx"]
106106

107107
# Add module-specific .cpp file from _cpp/ directory if it exists
108+
# Example: _resource_handles.pyx finds _cpp/resource_handles.cpp.
108109
cpp_file = f"cuda/core/_cpp/{mod_name.lstrip('_')}.cpp"
109110
if os.path.exists(cpp_file):
110111
sources.append(cpp_file)

cuda_core/cuda/core/__init__.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,6 @@
1515

1616
import importlib
1717

18-
# The _resource_handles module exports a PyCapsule dispatch table that other
19-
# extension modules access via PyCapsule_Import. We import it here to ensure
20-
# it's loaded before other modules try to use it.
21-
#
22-
# We use importlib.import_module with the full path to avoid triggering
23-
# circular import issues that can occur with relative imports during
24-
# package initialization.
25-
_resource_handles = importlib.import_module("cuda.core._resource_handles")
26-
2718
subdir = f"cu{cuda_major}"
2819
try:
2920
versioned_mod = importlib.import_module(f".{subdir}", __package__)

0 commit comments

Comments
 (0)