Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.2.4 rocm codspeed #20

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: codspeed-benchmarks

on:
# Run on pushes to the main branch
push:
branches:
- "master" # or "main"
# Run on pull requests
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# ...
# Setup your environment here:
# - Configure your Python/Rust/Node version
# - Install your dependencies
# - Build your benchmarks (if using a compiled language)
# ...
- uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: cuda-toolkit
uses: Jimver/[email protected]
with:
cuda: "12.1.0"

# - run: echo "Installed cuda version is: ${{steps.cuda-toolkit.outputs.cuda}}"
# - run: echo "Cuda install location: ${{steps.cuda-toolkit.outputs.CUDA_PATH}}"
- run: nvcc -V

- name: Install project dependencies
run: pip install -e . && pip install pytest

- name: Run benchmarks
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.codspeed_token }}
run: "pytest tests/kernels/test_layernorm.py --codspeed"
1 change: 1 addition & 0 deletions tests/kernels/test_layernorm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
SEEDS = [0]


@pytest.mark.benchmark
@pytest.mark.parametrize("num_tokens", NUM_TOKENS)
@pytest.mark.parametrize("hidden_size", HIDDEN_SIZES)
@pytest.mark.parametrize("add_residual", ADD_RESIDUAL)
Expand Down
Loading