Repository navigation
ci: build and test local CUDA 12 bindings #3317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,14 +36,23 @@ jobs: | |
| WINDOWS_ARM64_SUPPORTED: ${{ steps.get-vars.outputs.windows_arm64_supported }} | ||
| WINDOWS_ARM64_SINGLE_CUDA_MAJOR: ${{ steps.get-vars.outputs.windows_arm64_single_cuda_major }} | ||
| PYTHON_SUPPORTED: ${{ steps.get-vars.outputs.python_supported }} | ||
| BINDINGS_CONFIG: ${{ steps.get-vars.outputs.bindings_config }} | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 1 | ||
| - name: Set up Python for CI tools | ||
| uses: ./.github/actions/setup-hardened-python | ||
| with: | ||
| python-version: "3.12" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Again, |
||
| - name: Install CI tool dependencies | ||
| run: python -m pip install -e ./ci | ||
| - name: Get CUDA build versions | ||
| id: get-vars | ||
| run: | | ||
| bindings_config=$(python -m ci.tools.bindings_config) | ||
| echo "bindings_config=$bindings_config" >> "$GITHUB_OUTPUT" | ||
| cuda_build_ver=$(yq '.cuda.build.version' ci/versions.yml) | ||
| echo "cuda_build_ver=$cuda_build_ver" >> $GITHUB_OUTPUT | ||
|
|
||
|
|
@@ -623,6 +632,86 @@ jobs: | |
| nruns: ${{ (github.event_name == 'schedule' && 5) || 1}} | ||
| workplan: ${{ needs.detect-changes.outputs.workplan }} | ||
|
|
||
| test-maintenance-bindings-linux-64: | ||
| name: Maintenance bindings (linux-64) | ||
| if: ${{ github.repository_owner == 'nvidia' && | ||
| !fromJSON(needs.should-skip.outputs.skip) && | ||
| !fromJSON(needs.should-skip.outputs.doc-only) && | ||
| fromJSON(needs.detect-changes.outputs.workplan).modules.bindings.needs_test && | ||
| fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.linux }} | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| needs: | ||
| - ci-vars | ||
| - should-skip | ||
| - detect-changes | ||
| - build-linux-64 | ||
| secrets: inherit | ||
| uses: ./.github/workflows/test-wheel-linux.yml | ||
| with: | ||
| build-type: ${{ startsWith(github.ref_name, 'pull-request/') && 'pull-request' || (github.event_name == 'schedule' && 'nightly' || 'branch') }} | ||
| host-platform: linux-64 | ||
| build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }} | ||
| bindings-config: ${{ needs.ci-vars.outputs.BINDINGS_CONFIG }} | ||
| bindings-only: true | ||
| nruns: ${{ (github.event_name == 'schedule' && 5) || 1 }} | ||
| workplan: ${{ needs.detect-changes.outputs.workplan }} | ||
|
|
||
| test-maintenance-bindings-linux-aarch64: | ||
| name: Maintenance bindings (linux-aarch64) | ||
| if: ${{ github.repository_owner == 'nvidia' && | ||
| !fromJSON(needs.should-skip.outputs.skip) && | ||
| !fromJSON(needs.should-skip.outputs.doc-only) && | ||
| fromJSON(needs.detect-changes.outputs.workplan).modules.bindings.needs_test && | ||
| fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.linux }} | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| needs: | ||
| - ci-vars | ||
| - should-skip | ||
| - detect-changes | ||
| - build-linux-64 | ||
| - build-linux-aarch64 | ||
| secrets: inherit | ||
| uses: ./.github/workflows/test-wheel-linux.yml | ||
| with: | ||
| build-type: ${{ startsWith(github.ref_name, 'pull-request/') && 'pull-request' || (github.event_name == 'schedule' && 'nightly' || 'branch') }} | ||
| host-platform: linux-aarch64 | ||
| build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }} | ||
| bindings-config: ${{ needs.ci-vars.outputs.BINDINGS_CONFIG }} | ||
| bindings-only: true | ||
| nruns: ${{ (github.event_name == 'schedule' && 5) || 1 }} | ||
| workplan: ${{ needs.detect-changes.outputs.workplan }} | ||
|
|
||
| test-maintenance-bindings-windows: | ||
| name: Maintenance bindings (win-64) | ||
| if: ${{ github.repository_owner == 'nvidia' && | ||
| !fromJSON(needs.should-skip.outputs.skip) && | ||
| !fromJSON(needs.should-skip.outputs.doc-only) && | ||
| fromJSON(needs.detect-changes.outputs.workplan).modules.bindings.needs_test && | ||
| fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.windows }} | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| needs: | ||
| - ci-vars | ||
| - should-skip | ||
| - detect-changes | ||
| - build-linux-64 | ||
| - build-windows | ||
| secrets: inherit | ||
| uses: ./.github/workflows/test-wheel-windows.yml | ||
| with: | ||
| build-type: ${{ startsWith(github.ref_name, 'pull-request/') && 'pull-request' || (github.event_name == 'schedule' && 'nightly' || 'branch') }} | ||
| host-platform: win-64 | ||
| build-ctk-ver: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }} | ||
| bindings-config: ${{ needs.ci-vars.outputs.BINDINGS_CONFIG }} | ||
| bindings-only: true | ||
| nruns: ${{ (github.event_name == 'schedule' && 5) || 1 }} | ||
| workplan: ${{ needs.detect-changes.outputs.workplan }} | ||
|
|
||
| doc: | ||
| name: Docs | ||
| if: ${{ github.repository_owner == 'nvidia' }} | ||
|
|
@@ -657,6 +746,9 @@ jobs: | |
| - test-linux-64 | ||
| - test-linux-aarch64 | ||
| - test-windows | ||
| - test-maintenance-bindings-linux-64 | ||
| - test-maintenance-bindings-linux-aarch64 | ||
| - test-maintenance-bindings-windows | ||
| - api-check-core-vs-release | ||
| - api-check-core-vs-base | ||
| - doc | ||
|
|
@@ -684,6 +776,7 @@ jobs: | |
| windows_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.windows || false }}" | ||
| windows_arm64_supported="${{ needs.ci-vars.outputs.WINDOWS_ARM64_SUPPORTED }}" | ||
| build_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.sdist_tests || false }}" | ||
| maintenance_bindings_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).modules.bindings.needs_test || false }}" | ||
| run_core_api_check="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.core_api_checks || false }}" | ||
| is_pr="${{ startsWith(github.ref_name, 'pull-request/') }}" | ||
| status="success" | ||
|
|
@@ -734,6 +827,16 @@ jobs: | |
| check_result "test-linux-aarch64" "$linux_expected" | ||
| check_result "test-windows" "$windows_expected" | ||
|
|
||
| maintenance_linux_expected="skipped" | ||
| maintenance_windows_expected="skipped" | ||
| if [[ "$maintenance_bindings_selected" == "true" ]]; then | ||
| maintenance_linux_expected="$linux_expected" | ||
| maintenance_windows_expected="$windows_expected" | ||
| fi | ||
| check_result "test-maintenance-bindings-linux-64" "$maintenance_linux_expected" | ||
| check_result "test-maintenance-bindings-linux-aarch64" "$maintenance_linux_expected" | ||
| check_result "test-maintenance-bindings-windows" "$maintenance_windows_expected" | ||
|
|
||
| # API compatibility checks run for cuda_core source changes and for | ||
| # conservative full runs when reusable base artifacts are unavailable. | ||
| expected="skipped" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,14 @@ on: | |
| build-ctk-ver: | ||
| type: string | ||
| required: true | ||
| bindings-config: | ||
| description: Normalized bindings registry for maintenance-only tests. | ||
| type: string | ||
| default: '' | ||
| bindings-only: | ||
| description: Test this run's maintenance bindings wheel and Cython extensions. | ||
| type: boolean | ||
| default: false | ||
|
Comment on lines
+23
to
+26
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| matrix_filter: | ||
| type: string | ||
| default: "." | ||
|
|
@@ -55,6 +63,8 @@ jobs: | |
| runs-on: ubuntu-latest | ||
| env: | ||
| BUILD_TYPE: ${{ inputs.build-type }} | ||
| BINDINGS_CONFIG: ${{ inputs.bindings-config }} | ||
| BINDINGS_ONLY: ${{ inputs.bindings-only }} | ||
| ARCH: ${{ (inputs.host-platform == 'linux-64' && 'amd64') || | ||
| (inputs.host-platform == 'linux-aarch64' && 'arm64') }} | ||
| outputs: | ||
|
|
@@ -83,6 +93,14 @@ jobs: | |
| # Read base matrix from YAML file for the specific architecture | ||
| TEST_MATRIX=$(yq -o json ".linux[\"${MATRIX_TYPE}\"] | map(select(.ARCH == \"${ARCH}\"))" ci/test-matrix.yml) | ||
|
|
||
| if [[ "$BINDINGS_ONLY" == "true" ]]; then | ||
| TEST_MATRIX=$(jq -c --argjson config "$BINDINGS_CONFIG" ' | ||
| ($config.package_roots[] | select(.release_status == "maintenance")) as $package | ||
| | map(select(.CUDA_VER == $package.toolkit_version) | ||
| | . + {BINDINGS_ROOT: $package.package_root}) | ||
| ' <<< "$TEST_MATRIX") | ||
| fi | ||
|
|
||
| # Apply matrix filter; reject custom DRIVER + FLAVOR=wsl (the | ||
| # in-container driver swap doesn't work under WSL); add a | ||
| # RUNNER_DRIVER field that maps any custom version back to | ||
|
|
@@ -99,10 +117,10 @@ jobs: | |
|
|
||
| test: | ||
| env: | ||
| TEST_PATHFINDER: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.pathfinder.needs_test }} | ||
| TEST_BINDINGS: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_test }} | ||
| TEST_CORE: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_test }} | ||
| TEST_PYTHON: ${{ inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_test }} | ||
| TEST_PATHFINDER: ${{ !inputs.bindings-only && (inputs.workplan == '' || fromJSON(inputs.workplan).modules.pathfinder.needs_test) }} | ||
| TEST_BINDINGS: ${{ inputs.bindings-only || inputs.workplan == '' || fromJSON(inputs.workplan).modules.bindings.needs_test }} | ||
| TEST_CORE: ${{ !inputs.bindings-only && (inputs.workplan == '' || fromJSON(inputs.workplan).modules.core.needs_test) }} | ||
| TEST_PYTHON: ${{ !inputs.bindings-only && (inputs.workplan == '' || fromJSON(inputs.workplan).modules.python.needs_test) }} | ||
| name: Python ${{ matrix.PY_VER }}, CUDA ${{ matrix.CUDA_VER }} (${{ (matrix.LOCAL_CTK == '1' && 'local') || 'wheels' }}), GPU ${{ matrix.GPU }}${{ matrix.GPU_COUNT != '1' && format(' (x{0})', matrix.GPU_COUNT) || '' }}${{ matrix.FLAVOR && format(', {0}', matrix.FLAVOR) || '' }}${{ matrix.ENV.TORCH_VER && format(', {0}+{1}', matrix.ENV.TORCH_VER, matrix.ENV.TORCH_CUDA) || '' }}${{ matrix.ENV.MODE == 'nightly-numba-cuda' && ', latest' || '' }} | ||
| timeout-minutes: 60 | ||
| needs: compute-matrix | ||
|
|
@@ -168,7 +186,9 @@ jobs: | |
|
|
||
| - name: Set environment variables | ||
| env: | ||
| BUILD_CUDA_VER: ${{ inputs.build-ctk-ver }} | ||
| BUILD_CUDA_VER: ${{ inputs.bindings-only && matrix.CUDA_VER || inputs.build-ctk-ver }} | ||
| CUDA_BINDINGS_ROOT: ${{ matrix.BINDINGS_ROOT || 'cuda_bindings_13' }} | ||
| BINDINGS_ARTIFACT_PREFIX: ${{ inputs.bindings-only && 'maintenance-bindings' || 'cuda-bindings' }} | ||
| CUDA_VER: ${{ matrix.CUDA_VER }} | ||
| HOST_PLATFORM: ${{ inputs.host-platform }} | ||
| LOCAL_CTK: ${{ matrix.LOCAL_CTK }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my previous comments in #3315 and #3316 about
bindings_scm_version.