Adds benchmarking code under encoding/bench. Run make benchmark_cpu to run a benchmark with the default settings. The command outputs a file called benchmark_results.json that has a list of encode times for each run.
Flags:
flag.StringVar(&config.OutputFile, "output", "benchmark_results.json", "Output file for results")
flag.Uint64Var(&config.BlobLength, "blob-length", 1048576, "Blob length (power of 2)")
flag.Uint64Var(&config.NumChunks, "num-chunks", 8192, "Minimum number of chunks (power of 2)")
flag.Uint64Var(&config.NumRuns, "num-runs", 10, "Number of times to run the benchmark")
flag.StringVar(&config.CPUProfile, "cpuprofile", "", "Write CPU profile to file")
flag.StringVar(&config.MemProfile, "memprofile", "", "Write memory profile to file")
flag.BoolVar(&config.EnableVerify, "enable-verify", false, "Verify blobs after encoding")
The PR also refactors the code in order to support GPU based components in the future. Separating out the ideas present in https://github.com/Layr-Labs/eigenda/pull/642 into multiple PRs.
Got the following result on a g6.4xlarge (only using the CPU code)
In addition, at the larger blob sizes the reed solomon encoding also becomes a dominant factor which suggest we should focus on accelerating ComputeMultiFrameProof and ExtendPolyEval.
Checks
[x] I've made sure the lint is passing in this PR.
[x] I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
Why are these changes needed?
Adds benchmarking code under
encoding/bench
. Runmake benchmark_cpu
to run a benchmark with the default settings. The command outputs a file calledbenchmark_results.json
that has a list of encode times for each run.Flags:
The PR also refactors the code in order to support GPU based components in the future. Separating out the ideas present in https://github.com/Layr-Labs/eigenda/pull/642 into multiple PRs.
Got the following result on a g6.4xlarge (only using the CPU code)
In addition, at the larger blob sizes the reed solomon encoding also becomes a dominant factor which suggest we should focus on accelerating
ComputeMultiFrameProof
andExtendPolyEval
.Checks