-
Notifications
You must be signed in to change notification settings - Fork 2
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
make batch size configurable #326
Conversation
iris-mpc-gpu/src/server/sync_nccl.rs
Outdated
const SERIAL_SIZE: usize = 16384; | ||
pub const MAX_REQUESTS: usize = 256 * 2; | ||
const MAX_REQUEST_ID_LEN: usize = 36; // uuidv4 string | ||
const SERIAL_SIZE: usize = MAX_REQUESTS * MAX_REQUEST_ID_LEN; |
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.
I think this is not enough since we use serde_json?
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.
replaced the json now with bincode, now we can calculate max sizes safely
iris-mpc-gpu/src/server/sync_nccl.rs
Outdated
@@ -72,7 +72,7 @@ mod tests { | |||
// My state. | |||
let state = SyncState { | |||
db_len: 123, | |||
deleted_request_ids: vec!["A".repeat(MAX_REQUEST_ID_LEN); MAX_REQUESTS], | |||
deleted_request_ids: vec!["A".repeat(MAX_REQUEST_ID_LEN); 128], |
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.
I think the point of this test is to really check that the worst-case serialization size fits into the above buffer size
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.
yeah let me add this MAX_REQUESTS
here again
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.
also the max len gets overwritten here? probably not what is wanted
… ps/feat/config-batch-size
… ps/feat/config-batch-size
Since we will start with a DB that fits in memory and only a bit later have one that doesn't fit anymore, we'll also need to update the batchsize during operations (from 64 to 256). This now makes this only a config change.