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

Fix Barrett reduce native benchmark #65

Merged
merged 6 commits into from
Sep 22, 2021
Merged

Conversation

fboemer
Copy link
Contributor

@fboemer fboemer commented Sep 21, 2021

  • Inlines BarrettReduce64 for improved performance on BM_EltwiseReduceModNative
  • Adds minimum value to GenerateInsecureUniformRandomValue / GenerateInsecureUniformRandomValues
  • Removes the if (operand[i] >= modulus) check from hexl/eltwise/eltwise-reduce-mod.cpp => ~10% speedup on vectors with all values >= modulus. In practice, we expect almost all the input values to EltwiseReduceMod to be >= modulus, so this is a better case to optimize for.

@fboemer fboemer requested a review from a team as a code owner September 21, 2021 22:58
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
@fboemer fboemer temporarily deployed to intel_workflow September 21, 2021 22:58 Inactive
Copy link
Contributor

@hamishun hamishun left a comment

Choose a reason for hiding this comment

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

LG

@fboemer fboemer merged commit ac31741 into main Sep 22, 2021
@fboemer fboemer deleted the fboemer/fix-gcc-perf-regression branch September 22, 2021 14:13
fboemer added a commit that referenced this pull request Nov 8, 2021
* Inline BarrettReduce64

* Add min_value to GenerateInsecureUniformRandomValues

* remove condition check for Barrett reduce

* More benchmark input bounds
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.

None yet

3 participants