-
Notifications
You must be signed in to change notification settings - Fork 58
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
fbd72a4
commit c756093
Showing
6 changed files
with
154 additions
and
62 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
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
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
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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
LURK_PERF_CONFIG=max-parallel-simple | ||
LURK_RC=100,600 | ||
# Lurk config | ||
LURK_PERF=max-parallel-simple | ||
LURK_RC=100,600 | ||
LURK_BENCH_NOISE_THRESHOLD=0.10 | ||
|
||
# CUDA config | ||
NVIDIA_VISIBLE_DEVICES=all | ||
NVIDIA_DRIVER_CAPABILITITES=compute,utility | ||
EC_GPU_FRAMEWORK=cuda |
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
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 |
---|---|---|
@@ -1,19 +1,40 @@ | ||
# Install with `cargo install just` | ||
# Usage: `just --dotenv-filename /path/to/file.env <bench|gpu-bench>` | ||
# TODO: Move dotenv-filename into justfile once released on crates.io | ||
# TODO: Deduplicate loops | ||
set dotenv-load | ||
|
||
print-lurk-env: | ||
echo $LURK_PERF_CONFIG | ||
echo $LURK_RC | ||
commit := `git rev-parse HEAD` | ||
|
||
# TODO: Are these env scripts exposed as recipes? They should be variables | ||
# The `compute`/`sm` number corresponds to the Nvidia GPU architecture | ||
# In this case, the self-hosted machine uses the Ampere architecture, but we want this to be configurable | ||
# See https://arnon.dk/matching-sm-architectures-arch-and-gencode-for-various-nvidia-cards/ | ||
set-cuda-env: | ||
export CUDA_ARCH=$(nvidia-smi --query-gpu=compute_cap --format=csv,noheader | sed 's/\.//g') | ||
export EC_GPU_CUDA_NVCC_ARGS=$(--fatbin --gpu-architecture=sm_${{ env.CUDA_ARCH }} --generate-code=arch=compute_${{ env.CUDA_ARCH }},code=sm_${{ env.CUDA_ARCH }}) | ||
|
||
bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci | ||
print-lurk-env: | ||
printenv | grep -E 'LURK|EC_GPU|CUDA' | ||
|
||
gpu-bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci | ||
# Run CPU benchmarks | ||
bench +benches: set-cuda-env print-lurk-env | ||
#!/bin/sh | ||
if [ '{{benches}}' != '' ]; then | ||
for bench in {{benches}}; do | ||
cargo criterion --bench $bench | ||
done | ||
else | ||
echo "Invalid input, enter at least one non-empty string" | ||
fi | ||
|
||
deploy-bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci --message-format=json > ${{ github.sha }}.json | ||
# Run CUDA benchmarks on GPU | ||
gpu-bench +benches: set-cuda-env print-lurk-env | ||
#!/bin/sh | ||
if [ '{{benches}}' != '' ]; then | ||
for bench in {{benches}}; do | ||
cargo criterion --bench $bench --features "cuda" --message-format=json 2>&1 > {{commit}}.json | ||
done | ||
else | ||
echo "Invalid input, enter at least one non-empty string" | ||
fi |