### Run Sumcheck Example - Bash Source: https://github.com/polyhedrazk/expander/blob/main/sumcheck/cuda/README.md An example command to run a 2^23 sumcheck on the GPU. ```bash ./sumcheck.bin -m gpu -p 23 ``` -------------------------------- ### Expander CLI: Testing the Serve Command with HTTP Script Source: https://github.com/polyhedrazk/expander/blob/main/readme.md Shows the command to test the service started by `expander-exec serve`. This requires the `requests` Python package to be installed. ```sh python ./scripts/test_http.py # need "requests" package ``` -------------------------------- ### Running Expander Development Setup Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command executes the development setup binary for Expander. Ensure system requirements are met before running. ```sh cargo run --bin=dev-setup --release ``` -------------------------------- ### Expander CLI: Example Usage with MPI Source: https://github.com/polyhedrazk/expander/blob/main/readme.md Provides concrete examples of using the Expander CLI with `mpiexec` for proving, verifying, and serving, specifying a circuit file, witness file, output file, host IP, and port. ```sh RUSTFLAGS="-C target-cpu=native" mpiexec -n 1 cargo run --bin expander-exec --release -- prove -c ./data/circuit_m31.txt -w ./data/witness_m31.txt -o ./data/out_m31.bin RUSTFLAGS="-C target-cpu=native" mpiexec -n 1 cargo run --bin expander-exec --release -- verify -c ./data/circuit_m31.txt -w ./data/witness_m31.txt -i ./data/out_m31.bin RUSTFLAGS="-C target-cpu=native" mpiexec -n 1 cargo run --bin expander-exec --release -- serve -c ./data/circuit_m31.txt -h 127.0.0.1 -p 3030 ``` -------------------------------- ### Compile Project - Bash Source: https://github.com/polyhedrazk/expander/blob/main/sumcheck/cuda/README.md Compiles the sumcheck project, cleaning existing binaries and generating a new one. Requires CUDA to be installed. ```bash make clean && make ``` -------------------------------- ### Bn256 Scalar Field Benchmark Example Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command executes a specific benchmark for the Bn256 scalar field on a 16-core CPU, utilizing native CPU optimizations. ```sh RUSTFLAGS="-C target-cpu=native" cargo run --release --bin gkr -- -f fr -t 16 ``` -------------------------------- ### Expander CLI: Prove, Verify, Serve Commands Source: https://github.com/polyhedrazk/expander/blob/main/readme.md Demonstrates the basic usage of the Expander CLI for proving, verifying, and serving circuits. It includes placeholder arguments for circuit files, witness files, output files, host IP, and port. ```sh RUSTFLAGS="-C target-cpu=native" cargo run --bin expander-exec --release -- prove -c -w -o RUSTFLAGS="-C target-cpu=native" cargo run --bin expander-exec --release -- verify -c -w -i RUSTFLAGS="-C target-cpu=native" cargo run --bin expander-exec --release -- serve -c -h -p ``` -------------------------------- ### Expander CLI: Enabling Profiling Feature Source: https://github.com/polyhedrazk/expander/blob/main/readme.md Demonstrates how to enable the `gkr/profile` feature to obtain more detailed information about running times. Enabling this feature may slightly reduce overall performance. ```sh RUSTFLAGS="-C target-cpu=native" cargo run --bin expander-exec --release --features gkr/profile -- prove -c ./data/circuit_m31.txt -w ./data/witness_m31.txt -o ./data/out_m31.bin ``` -------------------------------- ### Running Expander Benchmarks Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command template is used for running Expander benchmarks, specifying the field type, number of threads, and hash function. It requires the `RUSTFLAGS` environment variable to be set for platform-specific accelerations. ```sh RUSTFLAGS="-C target-cpu=native" cargo run --release --bin gkr -- -f [fr|m31ext3] -t [#threads] -c keccak ``` -------------------------------- ### Run Sumcheck - Bash Source: https://github.com/polyhedrazk/expander/blob/main/sumcheck/cuda/README.md Executes the sumcheck protocol, allowing users to specify computation mode (CPU/GPU) and circuit size. Verbose mode can be enabled. ```bash ./sumcheck.bin -m [cpu|gpu] -p [2^(size) of circuit] [-v] ``` -------------------------------- ### Expander CLI: Customizing Hash Function and Polynomial Commitment Source: https://github.com/polyhedrazk/expander/blob/main/readme.md Illustrates how to specify custom hash functions (SHA256, Poseidon, MiMC5) and polynomial commitment schemes (Raw, Orion, Hyrax, KZG) in the Expander CLI. These options precede the main command (prove/verify). ```sh RUSTFLAGS="-C target-cpu=native" cargo run --bin expander-exec --release -- -f SHA256 -p Raw prove -c -w -o ``` -------------------------------- ### Running Expander Correctness Test Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command runs the standard Rust tests for Expander, ensuring end-to-end proof generation and verification correctness. The `--nocapture` flag displays test output. ```sh RUSTFLAGS="-C target-cpu=native" cargo test --release -- --nocapture ``` -------------------------------- ### Compile with BN254 Field Support - Bash Source: https://github.com/polyhedrazk/expander/blob/main/sumcheck/cuda/README.md Compiles the project while enabling support for BN254 field operations by setting the USE_FIELD variable in the Makefile. ```bash make clean && make USE_FIELD=useBN254 ``` -------------------------------- ### Enabling AVX2 Acceleration in Rust Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command enables AVX2 acceleration by setting the target CPU to native for Rust builds. It's crucial for performance on compatible x86 or Mac systems. ```rust RUSTFLAGS="-C target-cpu=native" cargo test --release --workspace ``` -------------------------------- ### Enabling AVX512 Acceleration in Rust Source: https://github.com/polyhedrazk/expander/blob/main/readme.md This command enables AVX512 acceleration by setting the target CPU to native and explicitly enabling the AVX512F feature for Rust builds. This provides further performance benefits on supporting hardware. ```rust RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo test --release --workspace ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.