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

Use ark_ff::batch_inversion for point normalization #126

Merged
merged 3 commits into from
Dec 11, 2020

Conversation

Pratyush
Copy link
Member

@Pratyush Pratyush commented Dec 11, 2020

Description

Reuses existing batch inversion code for batch normalization. Enables better parallelization, at the expense of some more allocation.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (main)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@Pratyush Pratyush force-pushed the batch-inversion-for-normalization branch from 2fc36f3 to 0fc71b6 Compare December 11, 2020 05:00
@Pratyush Pratyush requested a review from ValarDragon December 11, 2020 05:00
Copy link
Member

@ValarDragon ValarDragon left a comment

Choose a reason for hiding this comment

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

LGTM, glad we'll get parallel batch inversion speedups here!

I wonder if we should eventually restructure this to use split the vector into chunks, and operate on each chunk in parallel. (Using a serial batch inversion on that chunk)
That would keep the data being mutated in the final loop thread-local

@Pratyush
Copy link
Member Author

I think that's possible if we don't unify the logic with batch_inversion (essentially if we duplicate the logic in batch_inversion)

@Pratyush Pratyush merged commit eac2dd7 into master Dec 11, 2020
@Pratyush Pratyush deleted the batch-inversion-for-normalization branch December 11, 2020 05:36
@ValarDragon
Copy link
Member

Yeah I think we would have to duplicate that. We probably should move that standard chunk setup code to an ark-std macro

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.

2 participants