Skip to content

feat: add CodSpeed to the project #3

feat: add CodSpeed to the project

feat: add CodSpeed to the project #3

Workflow file for this run

name: Benchmark
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
benchmark_cpu:
name: CPU Pytest benchmark
runs-on: ubuntu-latest
steps:
- uses: asottile/workflows/.github/actions/fast-checkout@v1.6.0
- name: Setup environment
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install pytorch
shell: bash
run: pip install torch==2.2.0 --index-url https://download.pytorch.org/whl/cpu
- name: Install Kornia dev
shell: bash
run: pip install .[dev,x]
- name: Check torch version
shell: bash
run: pip show torch | grep 2.2.0 || false
- name: Print dependencies and kornia version
shell: bash
run: |
python -c "import torch;print('Pytorch version: ', torch.__version__)"
python -c "import kornia;print('Kornia version: ', kornia.__version__)"
- name: Install benchmark requirements
run: pip install -r requirements/requirements-benchmarks.txt
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest benchmarks/ -vvv --codspeed