Skip to content
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

Fewer calls to narrow and fewer steps to mess up compact gate #1056

Merged
merged 5 commits into from
May 13, 2024

Conversation

benjaminsavage
Copy link
Collaborator

@akoshelev was having trouble with compact gate, because aggregation had way too many step transitions. Thing is, most of them are never used. So I found a way to use fewer "steps" and calls to "narrow" to do the same thing. This should hopefully result in a lot less steps from a compact gate perspective.

@benjaminsavage benjaminsavage requested a review from akoshelev May 13, 2024 12:07
secret_sharing::{replicated::semi_honest::AdditiveShare, BitDecomposed, FieldSimd},
};

#[derive(Step)]
pub enum BucketStep {
#[dynamic(256)]
#[dynamic(512)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this MAX_BREAKDOWNS, and if so, can we use the constant here? Or if that will confuse the proc macro, at least document the association somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should match MAX_BREAKDOWNS, but I can't use a constant here:

ipa_macros::step "dynamic" attribute expects a number of steps (<= 1024) in parentheses: #[dynamic(...)].rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A%2F%2F%2FUsers%2Fbtsavage%2Fprojects%2Fipa-rust%2Fipa-core%2Fsrc%2Fprotocol%2Fipa_prf%2Faggregation%2Fbucket.rs)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not seem to be supported yet? rust-lang/rust#52393

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment, or moving the definition of MAX_BREAKDOWNS next to the step definition, or doing const_assert_eq!(MAX_BREAKDOWNS, 512) next to the step definition, would be fine.

akoshelev added a commit to akoshelev/raw-ipa that referenced this pull request May 13, 2024
We are working towards reducing the total number of steps (private-attribution#1056 is the step in that direction) and compact gate rearchitecture (private-attribution#961) in parallel. The old compact gate gets broken because of that but there is no real reason to fix it.

To avoid red CI, this temporarily disables compact gate checks until private-attribution#961 is merged
akoshelev added a commit to akoshelev/raw-ipa that referenced this pull request May 13, 2024
Continues the work started in private-attribution#1056 to reduce the total number of step transitions. Confirmed with @benjaminsavage that in WALR we don't need more than 9 bits and in OPRF IPA it is the same because the number of breakdowns is currently limited to 512
akoshelev added a commit to akoshelev/raw-ipa that referenced this pull request May 13, 2024
Continues the work started in private-attribution#1056 to reduce the total number of step transitions. Confirmed with @benjaminsavage that in WALR we don't need more than 9 bits and in OPRF IPA it is the same because the number of breakdowns is currently limited to 512
akoshelev added a commit that referenced this pull request May 13, 2024
Continues the work started in #1056 to reduce the total number of step transitions. Confirmed with @benjaminsavage that in WALR we don't need more than 9 bits and in OPRF IPA it is the same because the number of breakdowns is currently limited to 512
akoshelev added a commit that referenced this pull request May 13, 2024
We are working towards reducing the total number of steps (#1056 is the step in that direction) and compact gate rearchitecture (#961) in parallel. The old compact gate gets broken because of that but there is no real reason to fix it.

To avoid red CI, this temporarily disables compact gate checks until #961 is merged
Copy link

codecov bot commented May 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.39%. Comparing base (bf75126) to head (3e73128).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1056   +/-   ##
=======================================
  Coverage   90.38%   90.39%           
=======================================
  Files         167      167           
  Lines       24280    24283    +3     
=======================================
+ Hits        21946    21950    +4     
+ Misses       2334     2333    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@benjaminsavage benjaminsavage merged commit 10521e6 into private-attribution:main May 13, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants