|
| 1 | +# Single-GPU CUDA and OptiX acceptance. |
| 2 | +# |
| 3 | +# EXTERNAL RUNNER REQUIRED. Register a runner carrying every label in |
| 4 | +# `runs-on` below (`self-hosted`, `linux`, `x64`, `cuda`, `single-gpu`) with |
| 5 | +# CUDA Torch, Dr.Jit, the native build dependencies, and OptiX headers. |
| 6 | +# Labelled PRs opt in with `run-gpu-ci`; the weekly run detects driver and |
| 7 | +# pipeline drift; manual dispatch remains available for release validation. |
| 8 | + |
| 9 | +name: Single-GPU CUDA and OptiX Acceptance |
| 10 | + |
| 11 | +on: |
| 12 | + pull_request: |
| 13 | + types: [labeled] |
| 14 | + schedule: |
| 15 | + - cron: "41 8 * * 4" |
| 16 | + workflow_dispatch: |
| 17 | + inputs: |
| 18 | + python: |
| 19 | + description: >- |
| 20 | + Interpreter of the prepared CUDA build environment on the runner. |
| 21 | + It must contain CUDA Torch, Dr.Jit, Ninja, CMake, scikit-build-core, |
| 22 | + nanobind, and access to the OptiX headers. |
| 23 | + required: false |
| 24 | + default: python |
| 25 | + |
| 26 | +concurrency: |
| 27 | + group: single-gpu-${{ github.ref }} |
| 28 | + cancel-in-progress: true |
| 29 | + |
| 30 | +permissions: |
| 31 | + contents: read |
| 32 | + |
| 33 | +jobs: |
| 34 | + single-gpu: |
| 35 | + name: CUDA and OptiX acceptance / 1+ GPU (self-hosted) |
| 36 | + if: >- |
| 37 | + github.event_name == 'workflow_dispatch' || |
| 38 | + github.event_name == 'schedule' || |
| 39 | + (github.event_name == 'pull_request' && |
| 40 | + github.event.label.name == 'run-gpu-ci') |
| 41 | + runs-on: [self-hosted, linux, x64, cuda, single-gpu] |
| 42 | + timeout-minutes: 180 |
| 43 | + env: |
| 44 | + PYTHON: ${{ inputs.python || 'python' }} |
| 45 | + PYTHONPATH: ${{ github.workspace }}/python |
| 46 | + OPTIX_CACHE_PATH: ${{ runner.temp }}/rayd-optix-${{ github.run_id }}-${{ github.run_attempt }} |
| 47 | + RAYD_CI_BUILD_ROOT: ${{ runner.temp }}/rayd-build-${{ github.run_id }}-${{ github.run_attempt }} |
| 48 | + RAYD_CI_BUILD_MARKER: ${{ runner.temp }}/rayd-build-${{ github.run_id }}-${{ github.run_attempt }}.marker |
| 49 | + |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v5 |
| 52 | + |
| 53 | + - name: Report the runner's GPUs |
| 54 | + shell: bash |
| 55 | + run: nvidia-smi |
| 56 | + |
| 57 | + - name: Require a working CUDA device in Torch and Dr.Jit |
| 58 | + shell: bash |
| 59 | + run: "$PYTHON" -I tests/support/single_gpu_ci_preflight.py device |
| 60 | + |
| 61 | + - name: Build both backends from the checked-out source |
| 62 | + shell: bash |
| 63 | + run: | |
| 64 | + mkdir -p "$OPTIX_CACHE_PATH" |
| 65 | + mkdir -p "$RAYD_CI_BUILD_ROOT" |
| 66 | + "$PYTHON" -m pip uninstall -y rayd-drjit rayd-torch |
| 67 | + touch "$RAYD_CI_BUILD_MARKER" |
| 68 | + "$PYTHON" -m pip install --no-deps --no-build-isolation -e drjit \ |
| 69 | + -Cbuild-dir="$RAYD_CI_BUILD_ROOT/drjit" |
| 70 | + "$PYTHON" -m pip install --no-deps --no-build-isolation -e torch \ |
| 71 | + -Cbuild-dir="$RAYD_CI_BUILD_ROOT/torch" |
| 72 | +
|
| 73 | + - name: Print import paths and require both OptiX backends |
| 74 | + shell: bash |
| 75 | + run: "$PYTHON" -I tests/support/single_gpu_ci_preflight.py optix |
| 76 | + |
| 77 | + - name: Torch CUDA and OptiX core |
| 78 | + shell: bash |
| 79 | + run: | |
| 80 | + status=0 |
| 81 | + for module in \ |
| 82 | + tests.parity.test_cuda_geometry \ |
| 83 | + tests.parity.test_cuda_multipath \ |
| 84 | + tests.native.test_dispatcher_bindings \ |
| 85 | + tests.native.test_multipath \ |
| 86 | + tests.scene.test_mesh_instancing \ |
| 87 | + tests.reflection.test_torch_high_level_api |
| 88 | + do |
| 89 | + echo "::group::$module" |
| 90 | + "$PYTHON" -m unittest "$module" -v || status=1 |
| 91 | + echo "::endgroup::" |
| 92 | + done |
| 93 | + exit "$status" |
| 94 | +
|
| 95 | + - name: Dr.Jit CUDA and OptiX core |
| 96 | + shell: bash |
| 97 | + run: | |
| 98 | + status=0 |
| 99 | + for module in \ |
| 100 | + tests.scene.test_geometry_jit \ |
| 101 | + tests.reflection.test_epc_jit \ |
| 102 | + tests.reflection.test_accumulation_jit \ |
| 103 | + tests.diffraction.test_accumulation_jit \ |
| 104 | + tests.visibility.test_visibility_topk_jit |
| 105 | + do |
| 106 | + echo "::group::$module" |
| 107 | + "$PYTHON" -m unittest "$module" -v || status=1 |
| 108 | + echo "::endgroup::" |
| 109 | + done |
| 110 | + exit "$status" |
| 111 | +
|
| 112 | + - name: Dr.Jit cold OptiX pipeline matrix |
| 113 | + shell: bash |
| 114 | + run: "$PYTHON" -m unittest tests.native.test_optix_pipeline_cold_create_jit -v |
| 115 | + |
| 116 | + - name: Mixed geometry and SDF acceptance |
| 117 | + shell: bash |
| 118 | + run: | |
| 119 | + status=0 |
| 120 | + for module in \ |
| 121 | + tests.mixed.test_mixed_torch \ |
| 122 | + tests.mixed.test_mixed_jit \ |
| 123 | + tests.sdf.test_intersect \ |
| 124 | + tests.sdf.test_operations \ |
| 125 | + tests.sdf.test_operations_jit |
| 126 | + do |
| 127 | + echo "::group::$module" |
| 128 | + "$PYTHON" -m unittest "$module" -v || status=1 |
| 129 | + echo "::endgroup::" |
| 130 | + done |
| 131 | + exit "$status" |
| 132 | +
|
| 133 | + - name: Cross-backend numerical and AD parity |
| 134 | + shell: bash |
| 135 | + env: |
| 136 | + RAYD_TORCH_RUN_DR_JIT_PARITY: "1" |
| 137 | + run: | |
| 138 | + "$PYTHON" -m unittest \ |
| 139 | + tests.parity.test_drjit \ |
| 140 | + tests.parity.test_share2_ad -v |
| 141 | +
|
| 142 | + - name: CI and numerical contract governance |
| 143 | + shell: bash |
| 144 | + run: | |
| 145 | + "$PYTHON" -m unittest \ |
| 146 | + tests.governance.test_gpu_ci_contract \ |
| 147 | + tests.test_public_api_manifest \ |
| 148 | + tests.test_ptx_source_digest \ |
| 149 | + tests.test_compile_flag_policy_contract -v |
0 commit comments