CUDApp
CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit.
Brought by drakestapleton
CUDApp / .github / workflows / ci.yml
| 1 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 2 | # CI for CUDA++: the host-only test set (`make test`, no GPU opened, offline nvdisasm oracle) on a |
| 3 | # GitHub-hosted arm64 runner, judged by the exit code and the final |
| 4 | # `CUDA++ HOST TESTS PASS (<n> targets)` line as AGENTS.md prescribes. Chip tests need a GB10 |
| 5 | # and stay NOT_RUN here. A second job writes an SPDX SBOM of the tree for auditors. |
| 6 | name: CI |
| 7 | on: |
| 8 | pull_request: |
| 9 | push: |
| 10 | branches: [main] |
| 11 | permissions: |
| 12 | contents: read |
| 13 | jobs: |
| 14 | audit-scanner: |
| 15 | runs-on: ubuntu-latest |
| 16 | timeout-minutes: 5 |
| 17 | steps: |
| 18 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 19 | with: |
| 20 | persist-credentials: false |
| 21 | - name: Scanner detections and error refusal controls |
| 22 | run: bash tools/extract/audit-selftest.sh |
| 23 | host-tests: |
| 24 | runs-on: ubuntu-24.04-arm |
| 25 | # The #280 union runs 188 host targets; the reviewed head's serial run was inside target 27 |
| 26 | # (gpu_serving_alloc_count_test) when 40 minutes cancelled it. -j4 uses the runner's 4 vCPUs; the |
| 27 | # exhaustive MoE differential alone ran 3366 s on one GB10 core. PROVISIONAL until an exact-head run is measured. |
| 28 | timeout-minutes: 180 |
| 29 | steps: |
| 30 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 31 | with: |
| 32 | persist-credentials: false |
| 33 | fetch-depth: 0 # Portable derived receipts verify immutable original Git blobs. |
| 34 | - name: Toolchain record |
| 35 | run: gcc --version | head -n 1 && make --version | head -n 1 |
| 36 | - name: Pinned host verification tools |
| 37 | # Disposable hosted runner only. No CUDA driver, runtime or compiler is installed. |
| 38 | # Archive identity: NVIDIA cuda_nvdisasm.linux-sbsa in redistrib_13.0.2.json. |
| 39 | run: | |
| 40 | package=cuda_nvdisasm-linux-sbsa-13.0.85-archive |
| 41 | archive="$RUNNER_TEMP/$package.tar.xz" |
| 42 | curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 \ |
| 43 | "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvdisasm/linux-sbsa/$package.tar.xz" \ |
| 44 | --output "$archive" |
| 45 | printf '%s %s\n' 77e2ef1494270839829d5608352ba67a278e80fdaf4e3cc3c8ac9cb73e1c463c "$archive" | sha256sum --check --strict |
| 46 | tar -xJf "$archive" -C "$RUNNER_TEMP" "$package/bin/nvdisasm" |
| 47 | sudo install -D -m755 "$RUNNER_TEMP/$package/bin/nvdisasm" /usr/local/cuda/bin/nvdisasm |
| 48 | /usr/local/cuda/bin/nvdisasm --version |
| 49 | printf '%s\n' /usr/local/cuda/bin >> "$GITHUB_PATH" |
| 50 | git clone -q https://github.com/aien-dev/omega-mv "$RUNNER_TEMP/omega-mv" |
| 51 | git -C "$RUNNER_TEMP/omega-mv" checkout -q e5b32567a7aff3ce594e3254a622a846a6cd190b |
| 52 | git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge" |
| 53 | git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)" |
| 54 | git -C "$RUNNER_TEMP/omega-bridge" rev-parse HEAD |
| 55 | (cd "$RUNNER_TEMP/omega-bridge" && sh tools/bootstrap.sh && sh tools/build.sh) |
| 56 | - name: Host-only tests |
| 57 | # The runner's bash uses -e -o pipefail, so make's status is captured with `||`. |
| 58 | env: |
| 59 | OMEGA_OMC: ${{ runner.temp }}/omega-mv/seed/out/omc |
| 60 | OMEGA_BRIDGE: ${{ runner.temp }}/omega-bridge |
| 61 | run: | |
| 62 | # tee streams the log so a timeout still shows how far the suite got; with pipefail (the default bash -e shell lacks it), |
| 63 | # rc is make's status. |
| 64 | set -o pipefail; rc=0; make -j4 test 2>&1 | tee "$RUNNER_TEMP/make-test.log" || rc=$? |
| 65 | [ "$rc" -eq 0 ] || exit "$rc" |
| 66 | last=$(tail -n 1 "$RUNNER_TEMP/make-test.log") |
| 67 | case $last in |
| 68 | "CUDA++ HOST TESTS PASS ("*" targets)") ;; |
| 69 | *) echo "make test exited 0 without the final CUDA++ HOST TESTS PASS line"; exit 1 ;; |
| 70 | esac |
| 71 | om-units: |
| 72 | # The committed portable Omega bindings (src/cudapp_om_*.c) regenerate byte for byte from the pinned omc and |
| 73 | # omega-bridge, and every mutant .om unit goes red. omega-mv e5b32567 carries the pinned seed/out/omc. |
| 74 | runs-on: ubuntu-24.04-arm |
| 75 | timeout-minutes: 30 |
| 76 | steps: |
| 77 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 78 | with: |
| 79 | persist-credentials: false |
| 80 | - name: Pinned Omega tools |
| 81 | run: | |
| 82 | git clone -q https://github.com/aien-dev/omega-mv "$RUNNER_TEMP/omega-mv" |
| 83 | git -C "$RUNNER_TEMP/omega-mv" checkout -q e5b32567a7aff3ce594e3254a622a846a6cd190b |
| 84 | git clone -q https://github.com/aien-dev/omega-bridge "$RUNNER_TEMP/omega-bridge" |
| 85 | git -C "$RUNNER_TEMP/omega-bridge" checkout -q "$(grep -v '^#' om/omega-bridge.lock)" |
| 86 | (cd "$RUNNER_TEMP/omega-bridge" && sh tools/bootstrap.sh && sh tools/build.sh) |
| 87 | - name: Pinned offline NVIDIA instruction oracle |
| 88 | run: | |
| 89 | package=cuda_nvdisasm-linux-sbsa-13.0.85-archive |
| 90 | archive="$RUNNER_TEMP/$package.tar.xz" |
| 91 | curl --fail --location --silent --show-error --proto '=https' --tlsv1.2 \ |
| 92 | "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvdisasm/linux-sbsa/$package.tar.xz" \ |
| 93 | --output "$archive" |
| 94 | printf '%s %s\n' 77e2ef1494270839829d5608352ba67a278e80fdaf4e3cc3c8ac9cb73e1c463c "$archive" | sha256sum --check --strict |
| 95 | tar -xJf "$archive" -C "$RUNNER_TEMP" "$package/bin/nvdisasm" |
| 96 | sudo install -D -m755 "$RUNNER_TEMP/$package/bin/nvdisasm" /usr/local/cuda/bin/nvdisasm |
| 97 | - name: Bindings regenerate and mutants go red |
| 98 | run: make test-om-units test-om-encoder-mutants test-om-cubin-mutants OMEGA_MV="$RUNNER_TEMP/omega-mv" OMEGA_BRIDGE_DIR="$RUNNER_TEMP/omega-bridge" |
| 99 | - name: Exact MMIO contract and wrong-cache-policy control |
| 100 | run: make test-sm121-mmio OMEGA_MV="$RUNNER_TEMP/omega-mv" |
| 101 | - name: D8 process-tax dry run and D8 mutants (tests/d8_process_tax.om, tests/d8_mutants.om) |
| 102 | run: | |
| 103 | sudo apt-get update -qq && sudo apt-get install -y -qq bubblewrap |
| 104 | make d8-process-tax-dry-run test-graph-residue-mutants OMEGA_MV="$RUNNER_TEMP/omega-mv" OMEGA_BRIDGE_DIR="$RUNNER_TEMP/omega-bridge" |
| 105 | - name: LDG.E byte offset exact words, refusals and nvdisasm oracle (seeded .om gate) |
| 106 | run: make test-om-encoder-ldg OMEGA_MV="$RUNNER_TEMP/omega-mv" |
| 107 | - name: ATOMG.E.MIN.64 exact words and nvdisasm oracle (seeded .om gate) |
| 108 | run: make test-om-encoder-atomg OMEGA_MV="$RUNNER_TEMP/omega-mv" |
| 109 | - name: Guard predicates @P0 / @!P0 on every op, LDCU refusal and nvdisasm oracle (seeded .om gate) |
| 110 | run: make test-om-encoder-guard OMEGA_MV="$RUNNER_TEMP/omega-mv" |
| 111 | sbom: |
| 112 | runs-on: ubuntu-latest |
| 113 | timeout-minutes: 10 |
| 114 | steps: |
| 115 | - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 |
| 116 | with: |
| 117 | persist-credentials: false |
| 118 | - uses: anchore/sbom-action@66cbf4bc1f1c0d2edc94016e65bc221b6bb0ad6c # v0.24.3 |
| 119 | with: |
| 120 | path: . |
| 121 | format: spdx-json |
| 122 | artifact-name: sbom-${{ github.sha }}.spdx.json |