forked from kornia/kornia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a48ed83
commit dd0cff2
Showing
7 changed files
with
61 additions
and
345 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Benchmark | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
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 only 4 benchmarks because they take a long time to run for the time being | ||
run: | | ||
pytest -vvv --codspeed -n auto \ | ||
benchmarks/augmentation/2d_geometric_test.py::test_aug_2d_thin_plate_spline \ | ||
benchmarks/augmentation/2d_geometric_test.py::test_aug_2d_elastic_transform \ | ||
benchmarks/augmentation/2d_intensity_test.py::test_aug_2d_linear_corner_illumination \ | ||
benchmarks/augmentation/2d_intensity_test.py::test_aug_2d_solarize |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.