diff --git a/benchmarks/nx-cugraph/pytest-based/README.md b/benchmarks/nx-cugraph/pytest-based/README.md index 4ea0f127a51..781550fa560 100644 --- a/benchmarks/nx-cugraph/pytest-based/README.md +++ b/benchmarks/nx-cugraph/pytest-based/README.md @@ -19,13 +19,22 @@ Our current benchmarks provide the following datasets: ### Scripts #### 1. `run-main-benchmarks.sh` -This script allows users to run selected algorithms across multiple datasets and backends. All results are stored inside a sub-directory (`logs/`) and output files are named based on the combination of parameters for that benchmark. +This script allows users to run a small set of commonly-used algorithms across multiple datasets and backends. All results are stored inside a sub-directory (`logs/`) and output files are named based on the combination of parameters for that benchmark. -NOTE: If running with all algorithms, datasets, and backends, this script may take a few hours to finish running. +NOTE: If running with all algorithms and datasets using NetworkX without an accelerated backend, this script may take a few hours to finish running. **Usage:** + - Run with `--cpu-only`: ```bash - bash run-main-benchmarks.sh # edit this script directly + ./run-main-benchmarks.sh --cpu-only + ``` + - Run with `--gpu-only`: + ```bash + ./run-main-benchmarks.sh --gpu-only + ``` + - Run without any arguments (all backends): + ```bash + ./run-main-benchmarks.sh ``` #### 2. `get_graph_bench_dataset.py` @@ -37,7 +46,7 @@ This script downloads the specified dataset using `cugraph.datasets`. ``` #### 3. `create_results_summary_page.py` -This script is designed to be run after `run-gap-benchmarks.sh` in order to generate an HTML page displaying a results table comparing default NetworkX to nx-cugraph. The script also provides information about the current system. +This script is designed to be run after `run-gap-benchmarks.sh` in order to generate an HTML page displaying a results table comparing default NetworkX to nx-cugraph. The script also provides information about the current system, so it should be run on the machine on which benchmarks were run. **Usage:** ```bash diff --git a/benchmarks/nx-cugraph/pytest-based/run-main-benchmarks.sh b/benchmarks/nx-cugraph/pytest-based/run-main-benchmarks.sh index 1a81fe4b80a..a1d32474e5f 100755 --- a/benchmarks/nx-cugraph/pytest-based/run-main-benchmarks.sh +++ b/benchmarks/nx-cugraph/pytest-based/run-main-benchmarks.sh @@ -40,10 +40,26 @@ backends=" None cugraph-preconverted " +# check for --cpu-only or --gpu-only args +if [[ "$#" -eq 1 ]]; then + case $1 in + --cpu-only) + backends="None" + ;; + --gpu-only) + backends="cugraph-preconverted" + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac +fi for algo in $algos; do for dataset in $datasets; do - python get_graph_bench_dataset.py $dataset + # this script can be used to download benchmarking datasets by name via cugraph.datasets + python get_graph_bench_dataset.py $dataset for backend in $backends; do name="${backend}__${algo}__${dataset}" echo "Running: $backend, $dataset, bench_$algo"