CFG_bench is a tool for benchmarking the CFL algorithm from LAGraph.
- Install GraphBLAS:
git clone https://github.com/DrTimothyAldenDavis/GraphBLAS.git cd GraphBLAS make sudo make install cd ..
- Install LAGraph from the benchmark branch:
git clone https://github.com/SparseLinearAlgebra/LAGraph.git cd LAGraph git switch homka122/all_algorithms_benchmark make sudo make install cd ..
- Start the benchmark:
After unpacking, the benchmark data will be available in the
git clone https://github.com/homka122/CFG_bench.git cd CFG_bench gdown 12Qhc6XNXYbpPbZGp-lo30NsywFELAFhu unzip CFPQ_eval.zip -d . make ./build/cfg_bench -c configs/configs_my.csv -r 10 --hot
datafolder. Run./build/cfg_bench -hto print the CLI help message with descriptions of all available options. - (Optional) To use different graphs and grammars, upload the required files to the
datafolder.
The benchmark reads its input set from a CSV file passed with -c:
./build/cfg_bench -c configs/configs_my.csvUse -r to set the number of benchmark rounds and --hot to enable the HOT launch warm-up run.
Each row in the config file has this format:
<graph path>,<grammar path>,<expected result>
Example from configs/configs_my.csv:
data/graphs/c_alias/init.g,data/grammars/c_alias.cnf,3783769
To add a custom benchmark configuration:
-
Prepare the graph and grammar files
Put the required files into thedatadirectory (or use existing files there). -
Create a config file in
configs/or extend an existing one
Use the existing files inconfigs/as examples, such asconfigs/configs_my.csvorconfigs/configs_java.csv. -
Add one row per benchmark case
Each row must contain the graph path, grammar path, and expected result separated by commas.data/graphs/new_graph.g,data/grammars/new_grammar.cnf,12345 -
Run the benchmark with your config file
Pass the file with-c:./build/cfg_bench -c configs/your_config.csv
No source code changes are required.