Skip to content

Commit 47011d7

Browse files
authored
Merge branch 'main' into nvvm-discovery
2 parents 88a9772 + 67251a3 commit 47011d7

13 files changed

Lines changed: 75 additions & 100 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ jobs:
221221
uses: ./.github/workflows/build-docs.yml
222222
with:
223223
build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}
224+
is-release: ${{ github.ref_type == 'tag' }}
224225

225226
checks:
226227
name: Check job status

.github/workflows/release-cuda-pathfinder.yml

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
# One-click release workflow for cuda-pathfinder.
66
#
7-
# Provide a version number and commit SHA. The workflow automatically finds
8-
# the CI run and creates the git tag, creates a draft GitHub release with the standard
7+
# Provide a release tag. The workflow finds
8+
# the CI run, creates a draft GitHub release with the standard
99
# body, builds versioned docs, uploads source archive + wheels to the
1010
# release, publishes to TestPyPI, verifies the install, publishes to PyPI,
1111
# verifies again, and finally marks the release as published.
@@ -15,12 +15,8 @@ name: "Release: cuda-pathfinder"
1515
on:
1616
workflow_dispatch:
1717
inputs:
18-
version:
19-
description: "Version to release (e.g. 1.3.5)"
20-
required: true
21-
type: string
22-
commit:
23-
description: "Commit SHA to release (must be on default branch)"
18+
tag:
19+
description: "Release tag to publish (e.g. cuda-pathfinder-v1.3.5)"
2420
required: true
2521
type: string
2622

@@ -34,7 +30,7 @@ defaults:
3430

3531
jobs:
3632
# --------------------------------------------------------------------------
37-
# Validate inputs, find the CI run, create the tag + draft release.
33+
# Collect release metadata, find the CI run, create a draft release.
3834
# --------------------------------------------------------------------------
3935
prepare:
4036
runs-on: ubuntu-latest
@@ -53,52 +49,22 @@ jobs:
5349
exit 1
5450
fi
5551
56-
- name: Validate version
52+
- name: Set release variables
5753
id: vars
5854
env:
59-
VERSION_INPUT: ${{ inputs.version }}
55+
TAG_INPUT: ${{ inputs.tag }}
6056
run: |
61-
# Strip leading "v" if present (common typo)
62-
version="${VERSION_INPUT#v}"
63-
if [[ ! "${version}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
64-
echo "::error::Version must be MAJOR.MINOR.PATCH, got: ${version}"
65-
exit 1
66-
fi
67-
tag="cuda-pathfinder-v${version}"
57+
version="${TAG_INPUT#cuda-pathfinder-v}"
6858
{
69-
echo "tag=${tag}"
59+
echo "tag=${TAG_INPUT}"
7060
echo "version=${version}"
7161
} >> "$GITHUB_OUTPUT"
7262
73-
- name: Validate commit input format
74-
env:
75-
COMMIT_INPUT: ${{ inputs.commit }}
76-
run: |
77-
# Require a full SHA to avoid ambiguity and accidental releases.
78-
if [[ ! "${COMMIT_INPUT}" =~ ^[0-9a-fA-F]{40}$ ]]; then
79-
echo "::error::Commit must be a full 40-character SHA, got: ${COMMIT_INPUT}"
80-
exit 1
81-
fi
82-
8363
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8464
with:
8565
fetch-depth: 0
86-
ref: ${{ inputs.commit }}
87-
88-
- name: Validate and resolve commit
89-
id: commit
90-
env:
91-
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
92-
run: |
93-
git fetch --no-tags origin "${DEFAULT_BRANCH}"
94-
commit=$(git rev-parse --verify "HEAD^{commit}")
95-
96-
if ! git merge-base --is-ancestor "${commit}" "origin/${DEFAULT_BRANCH}"; then
97-
echo "::error::Commit ${commit} is not reachable from origin/${DEFAULT_BRANCH}"
98-
exit 1
99-
fi
100-
101-
echo "commit=${commit}" >> "$GITHUB_OUTPUT"
66+
# Resolve only the exact tag ref; checkout fails if the tag does not exist.
67+
ref: refs/tags/${{ steps.vars.outputs.tag }}
10268

10369
- name: Check release notes exist
10470
env:
@@ -117,22 +83,6 @@ jobs:
11783
ctk_ver=$(yq '.cuda.build.version' ci/versions.yml)
11884
echo "ctk-ver=${ctk_ver}" >> "$GITHUB_OUTPUT"
11985
120-
- name: Create tag
121-
env:
122-
TAG: ${{ steps.vars.outputs.tag }}
123-
TARGET_COMMIT: ${{ steps.commit.outputs.commit }}
124-
run: |
125-
if git rev-parse "${TAG}" >/dev/null 2>&1; then
126-
existing_commit=$(git rev-parse "${TAG}^{commit}")
127-
if [[ "${existing_commit}" != "${TARGET_COMMIT}" ]]; then
128-
echo "::error::Tag ${TAG} already exists at ${existing_commit}, expected ${TARGET_COMMIT}"
129-
exit 1
130-
fi
131-
else
132-
git tag "${TAG}" "${TARGET_COMMIT}"
133-
git push origin "${TAG}"
134-
fi
135-
13686
- name: Detect CI run ID
13787
id: detect-run
13888
env:
@@ -179,6 +129,7 @@ jobs:
179129
--repo "${{ github.repository }}" \
180130
--draft \
181131
--latest=false \
132+
--verify-tag \
182133
--title "cuda-pathfinder v${VERSION}" \
183134
--notes-file /tmp/release-body.md
184135

cuda_bindings/cuda/bindings/driver.pyx.in

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33

4-
# This code was automatically generated with version 13.1.0, generator version fd3f910. Do not modify it directly.
4+
# This code was automatically generated with version 13.1.0, generator version c185cc3. Do not modify it directly.
55
from typing import Any, Optional
66
import cython
77
import ctypes
@@ -26111,7 +26111,7 @@ def cuDeviceGetHostAtomicCapabilities(operations : Optional[tuple[CUatomicOperat
2611126111
cycapabilities = <unsigned int*>calloc(count, sizeof(unsigned int))
2611226112
if cycapabilities is NULL:
2611326113
raise MemoryError('Failed to allocate length x size memory: ' + str(count) + 'x' + str(sizeof(unsigned int)))
26114-
cdef vector[cydriver.CUatomicOperation] cyoperations = [int(pyoperations) for pyoperations in (operations)]
26114+
cdef vector[cydriver.CUatomicOperation] cyoperations = operations
2611526115
if count > len(operations): raise RuntimeError("List is too small: " + str(len(operations)) + " < " + str(count))
2611626116
with nogil:
2611726117
err = cydriver.cuDeviceGetHostAtomicCapabilities(cycapabilities, cyoperations.data(), count, cydev)
@@ -28374,7 +28374,7 @@ def cuModuleLoadDataEx(image, unsigned int numOptions, options : Optional[tuple[
2837428374
cdef void* cyimage = _helper_input_void_ptr(image, &cyimageHelper)
2837528375
if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
2837628376
if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
28377-
cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)]
28377+
cdef vector[cydriver.CUjit_option] cyoptions = options
2837828378
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
2837928379
cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist)
2838028380
cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr
@@ -28744,7 +28744,7 @@ def cuLinkCreate(unsigned int numOptions, options : Optional[tuple[CUjit_option]
2874428744
raise TypeError("Argument 'options' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]")
2874528745
if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
2874628746
if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
28747-
cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)]
28747+
cdef vector[cydriver.CUjit_option] cyoptions = options
2874828748
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
2874928749
cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist)
2875028750
cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr
@@ -28824,7 +28824,7 @@ def cuLinkAddData(state, typename not None : CUjitInputType, data, size_t size,
2882428824
cdef void* cydata = _helper_input_void_ptr(data, &cydataHelper)
2882528825
if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
2882628826
if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
28827-
cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)]
28827+
cdef vector[cydriver.CUjit_option] cyoptions = options
2882828828
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
2882928829
cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist)
2883028830
cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr
@@ -28895,7 +28895,7 @@ def cuLinkAddFile(state, typename not None : CUjitInputType, char* path, unsigne
2889528895
cdef cydriver.CUjitInputType cytypename = int(typename)
2889628896
if numOptions > len(options): raise RuntimeError("List is too small: " + str(len(options)) + " < " + str(numOptions))
2889728897
if numOptions > len(optionValues): raise RuntimeError("List is too small: " + str(len(optionValues)) + " < " + str(numOptions))
28898-
cdef vector[cydriver.CUjit_option] cyoptions = [int(pyoptions) for pyoptions in (options)]
28898+
cdef vector[cydriver.CUjit_option] cyoptions = options
2889928899
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(options, optionValues)]
2890028900
cdef _InputVoidPtrPtrHelper voidStarHelperoptionValues = _InputVoidPtrPtrHelper(pylist)
2890128901
cdef void** cyoptionValues_ptr = <void**><void_ptr>voidStarHelperoptionValues.cptr
@@ -29160,13 +29160,13 @@ def cuLibraryLoadData(code, jitOptions : Optional[tuple[CUjit_option] | list[CUj
2916029160
cdef CUlibrary library = CUlibrary()
2916129161
cdef _HelperInputVoidPtrStruct cycodeHelper
2916229162
cdef void* cycode = _helper_input_void_ptr(code, &cycodeHelper)
29163-
cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)]
29163+
cdef vector[cydriver.CUjit_option] cyjitOptions = jitOptions
2916429164
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)]
2916529165
cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist)
2916629166
cdef void** cyjitOptionsValues_ptr = <void**><void_ptr>voidStarHelperjitOptionsValues.cptr
2916729167
if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions))
2916829168
if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions))
29169-
cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)]
29169+
cdef vector[cydriver.CUlibraryOption] cylibraryOptions = libraryOptions
2917029170
pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)]
2917129171
cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist)
2917229172
cdef void** cylibraryOptionValues_ptr = <void**><void_ptr>voidStarHelperlibraryOptionValues.cptr
@@ -29258,13 +29258,13 @@ def cuLibraryLoadFromFile(char* fileName, jitOptions : Optional[tuple[CUjit_opti
2925829258
if not all(isinstance(_x, (CUjit_option)) for _x in jitOptions):
2925929259
raise TypeError("Argument 'jitOptions' is not instance of type (expected tuple[cydriver.CUjit_option] or list[cydriver.CUjit_option]")
2926029260
cdef CUlibrary library = CUlibrary()
29261-
cdef vector[cydriver.CUjit_option] cyjitOptions = [int(pyjitOptions) for pyjitOptions in (jitOptions)]
29261+
cdef vector[cydriver.CUjit_option] cyjitOptions = jitOptions
2926229262
pylist = [_HelperCUjit_option(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(jitOptions, jitOptionsValues)]
2926329263
cdef _InputVoidPtrPtrHelper voidStarHelperjitOptionsValues = _InputVoidPtrPtrHelper(pylist)
2926429264
cdef void** cyjitOptionsValues_ptr = <void**><void_ptr>voidStarHelperjitOptionsValues.cptr
2926529265
if numJitOptions > len(jitOptions): raise RuntimeError("List is too small: " + str(len(jitOptions)) + " < " + str(numJitOptions))
2926629266
if numJitOptions > len(jitOptionsValues): raise RuntimeError("List is too small: " + str(len(jitOptionsValues)) + " < " + str(numJitOptions))
29267-
cdef vector[cydriver.CUlibraryOption] cylibraryOptions = [int(pylibraryOptions) for pylibraryOptions in (libraryOptions)]
29267+
cdef vector[cydriver.CUlibraryOption] cylibraryOptions = libraryOptions
2926829268
pylist = [_HelperCUlibraryOption(pyoptions, pyoptionValues) for pyoptions, pyoptionValues in zip(libraryOptions, libraryOptionValues)]
2926929269
cdef _InputVoidPtrPtrHelper voidStarHelperlibraryOptionValues = _InputVoidPtrPtrHelper(pylist)
2927029270
cdef void** cylibraryOptionValues_ptr = <void**><void_ptr>voidStarHelperlibraryOptionValues.cptr
@@ -38566,7 +38566,7 @@ def cuMemRangeGetAttributes(dataSizes : tuple[int] | list[int], attributes : Opt
3856638566
cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist)
3856738567
cdef void** cyvoidStarHelper_ptr = <void**><void_ptr>voidStarHelperdata.cptr
3856838568
cdef vector[size_t] cydataSizes = dataSizes
38569-
cdef vector[cydriver.CUmem_range_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)]
38569+
cdef vector[cydriver.CUmem_range_attribute] cyattributes = attributes
3857038570
if numAttributes > <size_t>len(dataSizes): raise RuntimeError("List is too small: " + str(len(dataSizes)) + " < " + str(numAttributes))
3857138571
if numAttributes > <size_t>len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
3857238572
with nogil:
@@ -38715,7 +38715,7 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup
3871538715
if not all(isinstance(_x, (CUpointer_attribute)) for _x in attributes):
3871638716
raise TypeError("Argument 'attributes' is not instance of type (expected tuple[cydriver.CUpointer_attribute] or list[cydriver.CUpointer_attribute]")
3871738717
if numAttributes > len(attributes): raise RuntimeError("List is too small: " + str(len(attributes)) + " < " + str(numAttributes))
38718-
cdef vector[cydriver.CUpointer_attribute] cyattributes = [int(pyattributes) for pyattributes in (attributes)]
38718+
cdef vector[cydriver.CUpointer_attribute] cyattributes = attributes
3871938719
pylist = [_HelperCUpointer_attribute(pyattributes, 0, is_getter=True) for pyattributes in attributes]
3872038720
cdef _InputVoidPtrPtrHelper voidStarHelperdata = _InputVoidPtrPtrHelper(pylist)
3872138721
cdef void** cyvoidStarHelper_ptr = <void**><void_ptr>voidStarHelperdata.cptr
@@ -52586,7 +52586,7 @@ def cuDeviceGetP2PAtomicCapabilities(operations : Optional[tuple[CUatomicOperati
5258652586
cycapabilities = <unsigned int*>calloc(count, sizeof(unsigned int))
5258752587
if cycapabilities is NULL:
5258852588
raise MemoryError('Failed to allocate length x size memory: ' + str(count) + 'x' + str(sizeof(unsigned int)))
52589-
cdef vector[cydriver.CUatomicOperation] cyoperations = [int(pyoperations) for pyoperations in (operations)]
52589+
cdef vector[cydriver.CUatomicOperation] cyoperations = operations
5259052590
if count > len(operations): raise RuntimeError("List is too small: " + str(len(operations)) + " < " + str(count))
5259152591
with nogil:
5259252592
err = cydriver.cuDeviceGetP2PAtomicCapabilities(cycapabilities, cyoperations.data(), count, cysrcDevice, cydstDevice)

0 commit comments

Comments
 (0)