forked from argumentcomputer/lurk-beta
-
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
b7e603a
commit 7f2747e
Showing
6 changed files
with
156 additions
and
68 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,35 @@ | ||
# Install with `cargo install just` | ||
# Usage: `just --dotenv-filename /path/to/file.env <bench|gpu-bench>` | ||
# TODO: Move dotenv-filename into justfile once the feature is available | ||
set dotenv-load | ||
|
||
print-lurk-env: | ||
echo $LURK_PERF_CONFIG | ||
echo $LURK_RC | ||
commit := `git rev-parse HEAD` | ||
|
||
bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci | ||
# Run CPU benchmarks | ||
bench +benches: | ||
#!/bin/sh | ||
printenv LURK | ||
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 | ||
|
||
gpu-bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci | ||
|
||
deploy-bench: | ||
print-lurk-env | ||
cargo criterion --bench fibonacci --message-format=json > ${{ github.sha }}.json | ||
# Run CUDA benchmarks on GPU | ||
gpu-bench +benches: | ||
#!/bin/sh | ||
# 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/ | ||
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_$CUDA_ARCH --generate-code=arch=compute_$CUDA_ARCH,code=sm_$CUDA_ARCH" | ||
env | grep -E "LURK|EC_GPU|CUDA" | ||
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 |