-
Notifications
You must be signed in to change notification settings - Fork 2
Optimize server-setup, by offloading large matrix multiplication to GPU #11
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
Merged
Conversation
This file contains hidden or 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
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Shader is taken from https://gist.github.com/itzmeanjan/84613bc7595372c5e6b6c22481d42f9a Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
… it finishes Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
…queue Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
… buffer creation Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
…tion Signed-off-by: Anjan Roy <[email protected]>
… function Signed-off-by: Anjan Roy <[email protected]>
…spond` Signed-off-by: Anjan Roy <[email protected]>
Without $ cargo bench --features mutate_internal_client_state --profile optimized --bench offline_phase -q server_setup
Timer precision: 10 ns
offline_phase fastest │ slowest │ median │ mean │ samples │ iters
╰─ server_setup │ │ │ │ │
├─ 3 │ │ │ │ │
│ ╰─ DBConfig { db_entry_count: 65536, key_byte_len: 32, value_byte_len: 1024 } 2.522 m │ 2.648 m │ 2.585 m │ 2.585 m │ 2 │ 2
╰─ 4 │ │ │ │ │
╰─ DBConfig { db_entry_count: 65536, key_byte_len: 32, value_byte_len: 1024 } 2.535 m │ 2.552 m │ 2.543 m │ 2.543 m │ 2 │ 2 When enabled the $ cargo bench --features mutate_internal_client_state,gpu --profile optimized --bench offline_phase -q server_setup
Timer precision: 10 ns
offline_phase fastest │ slowest │ median │ mean │ samples │ iters
╰─ server_setup │ │ │ │ │
├─ 3 │ │ │ │ │
│ ╰─ DBConfig { db_entry_count: 65536, key_byte_len: 32, value_byte_len: 1024 } 12.18 s │ 12.69 s │ 12.45 s │ 12.46 s │ 25 │ 25
╰─ 4 │ │ │ │ │
╰─ DBConfig { db_entry_count: 65536, key_byte_len: 32, value_byte_len: 1024 } 11.73 s │ 12.24 s │ 11.86 s │ 11.87 s │ 26 │ 26 |
Signed-off-by: Anjan Roy <[email protected]>
Signed-off-by: Anjan Roy <[email protected]>
I benchmarked server-setup on AWS EC2 instance Server-setup on CPUServer-setup, partially offloaded to GPUNote Server-setup can be offloaded to GPU, by enabling feature |
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.
Use
vulkan
compute shaders to offload large matrix multiplication and matrix transposition to GPU(feature-gated by non-default
gpu
feature), for speeding upserver-setup
phase of ChalametPIR.