Skip to content

Commit

Permalink
Merge pull request #730 from opentensor/sam-benchmarking
Browse files Browse the repository at this point in the history
github action to automatically run benchmarking weights on standardized hardware
  • Loading branch information
unconst authored Aug 16, 2024
2 parents 5eb5e93 + d3f13d5 commit 164e64b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Empty file.
24 changes: 24 additions & 0 deletions scripts/benchmark_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh
set -ex

# List of pallets you want to benchmark
pallets=("pallet_subtensor" "pallet_collective" "pallet_commitments" "pallet_registry" "pallet_admin_utils")

# Chain spec and output directory
chain_spec="finney" # or your specific chain spec

for pallet in "${pallets[@]}"
do
echo "Benchmarking $pallet..."
cargo run --profile=production --features=runtime-benchmarks,try-runtime --bin node-subtensor -- benchmark pallet \
--chain $chain_spec \
--wasm-execution=compiled \
--pallet $pallet \
--extrinsic '*' \
--steps 50 \
--repeat 5 \
--output "pallets/$pallet/src/weights.rs" \
--template ./.maintain/frame-weight-template.hbs # Adjust this path to your template file
done

echo "All pallets have been benchmarked and weights updated."

0 comments on commit 164e64b

Please sign in to comment.