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

[Crypto] enable ADX support by default #4405

Merged
merged 7 commits into from
Jun 9, 2023

Conversation

tarakby
Copy link
Contributor

@tarakby tarakby commented May 31, 2023

BLST library uses ADX instructions to speed up computations. It implements software versions with and without ADX instructions. It uses the ADX version by default, but provides a CGO flag to use the non-ADX version when compiled by Go.
Using the flag is necessary for machines without ADX support.

So far the crypto lib was using the CGO flag by default to disable ADX. This PR switches the default to use ADX to benefit from the performance speed up. In order for tests and builds to work with older machines (without ADX), all makefiles have been updated to detect ADX support and add the CGO flag accordingly.

  • all Makefile detect ADX support and assign a new CGO flag to empty or no-ADX flag.
  • The new CGO flag is used by all Go commands, passed as argument to all Dockerfiles.

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2023

Codecov Report

Merging #4405 (f0b49e7) into feature/blst-based-crypto (01b64c5) will not change coverage.
The diff coverage is n/a.

@@                    Coverage Diff                     @@
##           feature/blst-based-crypto    #4405   +/-   ##
==========================================================
  Coverage                      53.71%   53.71%           
==========================================================
  Files                            857      857           
  Lines                          79948    79948           
==========================================================
  Hits                           42941    42941           
- Misses                         33610    33611    +1     
+ Partials                        3397     3396    -1     
Flag Coverage Δ
unittests 53.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 9 files with indirect coverage changes

@tarakby tarakby changed the title WIP [Crypto] enable ADX support by default Jun 1, 2023
@tarakby tarakby marked this pull request as ready for review June 9, 2023 02:25
@tarakby tarakby merged commit 2872fe7 into feature/blst-based-crypto Jun 9, 2023
@tarakby tarakby deleted the tarak/blst-adx branch June 9, 2023 02:26
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