-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[1/N][GPU encoder] Add benchmarking code and refactor encoding module #715
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dmanc
changed the title
[1/N][GPU encoder] Add benchmarking code and refactor CPU interfaces
[1/N][GPU encoder] Add benchmarking code and refactor encoding module
Aug 21, 2024
bxue-l2
reviewed
Aug 21, 2024
encoding/rs/encode.go
Outdated
return nil, fmt.Errorf("the provided encoding parameters are not sufficient for the size of the data input") | ||
} | ||
|
||
pdCoeffs := make([]fr.Element, g.NumEvaluations()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could be more efficient if you allocate and copy
https://github.com/consensys/gnark-crypto/blob/v0.13.0/ecc/bn254/fr/element.go#L193
bxue-l2
approved these changes
Aug 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 #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