-
Notifications
You must be signed in to change notification settings - Fork 14
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
Showing
2 changed files
with
93 additions
and
14 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,49 @@ | ||
name: Benchmarks | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
paths: | ||
- src/torchcodec/* | ||
- benchmarks/* | ||
- .github/workflows/benchmarks.yaml | ||
|
||
defaults: | ||
run: | ||
shell: bash -l -eo pipefail {0} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v3 | ||
- name: Setup conda env | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
miniconda-version: "latest" | ||
activate-environment: test | ||
python-version: '3.12' | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Install dependencies and FFmpeg | ||
run: | | ||
# TODO: torchvision and torchaudio shouldn't be needed. They were only added | ||
# to silence an error as seen in https://github.com/pytorch/torchcodec/issues/203 | ||
python -m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu | ||
conda install "ffmpeg=7.0.1" pkg-config -c conda-forge | ||
ffmpeg -version | ||
- name: Build and install torchcodec | ||
run: | | ||
python -m pip install -e ".[dev]" --no-build-isolation -vvv | ||
- name: Test generic decoder benchmark | ||
run: | | ||
python benchmarks/decoders/benchmark_decoders.py --bm_video_speed_min_run_seconds 1 | ||
- name: TEST README data geeneration benchmark | ||
run: | | ||
python benchmarks/decoders/generate_readme_data.py --test_run | ||
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