Skip to main content

AVX2 and AVX512 Support

Our compiler incorporates an embedded Expander, which utilizes AVX2 by default for critical proving steps. While Expander also supports AVX512 for enhanced performance, the method of enabling it depends on your specific use case.

Using AVX512 with Expander

In most scenarios, you can compile a separate version of Expander with AVX512 support and invoke it via the command line to leverage its additional performance benefits.

Enabling AVX512 in the Compiler

To use AVX512 within the compiler itself, you need to provide the following parameters to rustc:

-C target-cpu=native -C target-features=+avx512f

For example, to run tests with AVX512 support:

RUSTFLAGS="-C target-cpu=native -C target-feature=+avx512f" cargo test

Implementing AVX512 for Proving in Go

Enabling AVX512 for proving in Go requires a few additional steps:

  1. Clone the repository.
  2. Run the build-rust-avx512.sh script to compile the AVX512 library.
  3. Update your Go code to use this local repository.