[feature][doc] plot scaling #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test-GPU | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| # To limit Actions, | |
| # don't automatically run on synchronize, but allow manual triggering | |
| types: [opened, reopened, ready_for_review] | |
| paths: | |
| - "**" | |
| - "!**.md" | |
| - "!**.rst" | |
| - "!docs/**" | |
| - "!.bumpversion.toml" | |
| - "!.gitignore" | |
| - "!.github/workflows/*.yml" | |
| - ".github/workflows/test_gpu.yml" | |
| workflow_dispatch: # manual button click | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test-gpu: | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| os: ["linux-x64-nvidia-gpu-t4"] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Cache downloaded data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/mach | |
| # Key based on known file hashes from cached_download() calls | |
| key: mach-data-cache-v1-${{ runner.os }}-c93af0781daeebf771e53a42a629d4f311407410166ef2f1d227e9d2a1b8c641-c349dc1d677c561434fd0e4a74142c4a0a44b7e6ae0a42d446c078a528ef58c1 | |
| - name: Setup CUDA environment | |
| uses: ./.github/actions/setup-cuda-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cuda-version: "12.4.0" | |
| - name: Run CUDA unit tests | |
| run: make test | |
| benchmark: | |
| strategy: | |
| matrix: | |
| python-version: ["3.11"] | |
| os: ["linux-x64-nvidia-gpu-t4"] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Cache downloaded data | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/mach | |
| # Key based on known file hashes from cached_download() calls | |
| key: mach-data-cache-v1-${{ runner.os }}-c93af0781daeebf771e53a42a629d4f311407410166ef2f1d227e9d2a1b8c641-c349dc1d677c561434fd0e4a74142c4a0a44b7e6ae0a42d446c078a528ef58c1 | |
| - name: Setup CUDA environment | |
| uses: ./.github/actions/setup-cuda-python-env | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cuda-version: "12.4.0" | |
| - name: Run CUDA benchmark | |
| run: make benchmark | |
| - name: Plot benchmark (runtime) | |
| run: | |
| uv run --group compare tests/plot_benchmark.py --output .benchmarks/benchmark.png | |
| - name: Plot benchmark (throughput) | |
| run: | |
| uv run --group compare tests/plot_benchmark.py --points-per-second --output .benchmarks/benchmark_pps.png | |
| - name: Upload benchmark results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| include-hidden-files: true | |
| path: .benchmarks | |
| retention-days: 7 |