-
Notifications
You must be signed in to change notification settings - Fork 25
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
Max out the number of rows for OPRF step generation #823
Conversation
let (single_user_mode, query_size) = if cfg!(feature = "step-trace") && args.oprf { | ||
(true, usize::try_from(args.records_per_user).unwrap()) | ||
} else { | ||
(false, args.query_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.
Rather than use a boolean, you can use the IpaQueryStyle enum.
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.
Oh wait, it looks like I misunderstood the meaning of "single_user_mode".
pub number_of_users_in_flight: NonZeroU32, | ||
#[cfg_attr(feature = "clap", arg(long, default_value = "false"))] | ||
pub single_user_mode: bool, |
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.
Do we need both? Can we just use a single param for this?
feature = "clap", | ||
arg(long, default_value = "10", conflicts_with("single_user_mode")) | ||
)] | ||
pub number_of_users_in_flight: NonZeroU32, |
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 recommend instead an interface of just:
pub num_users
@@ -241,8 +254,12 @@ impl<R: Rng> Iterator for EventGenerator<R> { | |||
type Item = TestRawDataRecord; | |||
|
|||
fn next(&mut self) -> Option<Self::Item> { | |||
const USERS_IN_FLIGHT: usize = 10; |
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.
let users_in_flight = std::min(10, config.num_users);
} else { | ||
usize::try_from(self.config.number_of_users_in_flight.get()).unwrap() | ||
}; | ||
while self.users.len() < number_of_users_in_flight { |
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.
Maybe we move this into the constructor, and make it possible to configure it. Then this "replace" logic can just maintain self.users at a constant length.
#834 fixes the issue I wanted to address with this PR. Closing |
OPRF protocol step generation needed to run #822.
ipa::protocol::prf_sharding::UserNthPerStep
depends on the maximum number of rows of any users in the input. In order to generate all possible combinations of the steps, we need to generate the max allowable number of rows for a user. The max allowable number should be the number specified by#[dynamic(...)]
inUserNthRowStep
enum. For now, we userecords_per_user
which can be specified when running the benchmark.Note that this is a temporary solution. If the max number of rows become too large, we need a better way to generate the steps, likely by synthesizing the steps in the
Step
derive macro.