-
Notifications
You must be signed in to change notification settings - Fork 246
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
12 changed files
with
1,211 additions
and
30 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ site/ | |
.venv/ | ||
venv/ | ||
.ipynb_checkpoints/ | ||
.vscode/ | ||
|
||
# Misc | ||
.DS_Store | ||
|
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,30 @@ | ||
## Benchmarking Liger Kernels | ||
|
||
Follow these steps to benchmark and visualize kernel performance: | ||
|
||
1. Create a benchmark script | ||
- Add your script under `benchmark/scripts/` | ||
- Name it according to the kernel (e.g., `benchmark_<kernel_name>.py`) | ||
|
||
2. Run the benchmark | ||
- Results will be saved to `benchmark/data/all_benchmark_data.csv` | ||
|
||
Example: Benchmarking KTO Loss | ||
```bash | ||
cd benchmark | ||
python scripts/benchmark_kto_loss.py | ||
``` | ||
|
||
3. Visualize results | ||
- Use the visualization script with appropriate parameters | ||
|
||
Example: Visualizing KTO Loss benchmark results | ||
```bash | ||
python benchmarks_visualizer.py \ | ||
--kernel-name kto_loss \ | ||
--metric-name memory \ | ||
--kernel-operation-mode full | ||
``` | ||
|
||
4. View results | ||
- Generated plots will be saved in `benchmark/visualizations/` |
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
Oops, something went wrong.