Skip to content

Commit

Permalink
Merge pull request #558 from pq-code-package/fix-duplicate-symbol-check
Browse files Browse the repository at this point in the history
Fix duplicated symbol check for building libraries
  • Loading branch information
hanno-becker authored Dec 20, 2024
2 parents 96d4a1d + 660b4af commit 38291e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,8 @@ jobs:
name: 'aarch64'
- runner: ubuntu-latest
name: 'x86_64'
- runner: macos-latest
name: 'macos'
exclude:
- {external: true,
target: {
Expand All @@ -262,6 +264,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: native build+functest (gcc-4.8)
if: ${{ matrix.target.runner != 'macos-latest' }}
uses: ./.github/actions/multi-functest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -272,6 +275,7 @@ jobs:
acvp: false
nix-shell: "ci_gcc48"
- name: native build+functest (gcc-4.9)
if: ${{ matrix.target.runner != 'macos-latest' }}
uses: ./.github/actions/multi-functest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -282,6 +286,7 @@ jobs:
acvp: false
nix-shell: "ci_gcc49"
- name: native build+functest (gcc-7)
if: ${{ matrix.target.runner != 'macos-latest' }}
uses: ./.github/actions/multi-functest
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions mk/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ $(BUILD_DIR)/%.a: $(CONFIG)
# $AR doesn't care about duplicated symbols, one can only find it out via actually linking.
# The easiest one to do this that one can think of is to create a dummy C file with empty main function on the fly, pipe it to $CC and link with the built library
$(eval _LIB := $(subst $(BUILD_DIR)/lib,,$(@:%.a=%)))
ifneq ($(findstring clang,$(shell $(CC) --version)),) # if CC is clang
ifneq ($(findstring Darwin,$(HOST_PLATFORM)),) # if is on macOS
$(Q)echo "int main() {return 0;}" \
| $(CC) -x c - -L$(BUILD_DIR) \
-all_load -Wl,-undefined,dynamic_lookup -l$(_LIB) \
-Imlkem $(wildcard test/notrandombytes/*.c)
$(Q)rm -f a.out
else # if CC is not clang
else # if not on macOS
$(Q)echo "int main() {return 0;}" \
| $(CC) -x c - -L$(BUILD_DIR) \
-Wl,--whole-archive,--unresolved-symbols=ignore-in-object-files -l$(_LIB) \
Expand Down

19 comments on commit 38291e9

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Arm Cortex-A76 (Raspberry Pi 5) benchmarks

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 29016 cycles 29020 cycles 1.00
ML-KEM-512 encaps 35397 cycles 35399 cycles 1.00
ML-KEM-512 decaps 45884 cycles 45885 cycles 1.00
ML-KEM-768 keypair 49350 cycles 49349 cycles 1.00
ML-KEM-768 encaps 55575 cycles 55572 cycles 1.00
ML-KEM-768 decaps 70335 cycles 70332 cycles 1.00
ML-KEM-1024 keypair 72068 cycles 72066 cycles 1.00
ML-KEM-1024 encaps 80844 cycles 80843 cycles 1.00
ML-KEM-1024 decaps 100677 cycles 100670 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Intel Xeon 4th gen (c7i)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 13938 cycles 13510 cycles 1.03
ML-KEM-512 encaps 17207 cycles 17280 cycles 1.00
ML-KEM-512 decaps 23039 cycles 22800 cycles 1.01
ML-KEM-768 keypair 22501 cycles 22519 cycles 1.00
ML-KEM-768 encaps 24569 cycles 24482 cycles 1.00
ML-KEM-768 decaps 32596 cycles 32502 cycles 1.00
ML-KEM-1024 keypair 31492 cycles 31417 cycles 1.00
ML-KEM-1024 encaps 35039 cycles 34959 cycles 1.00
ML-KEM-1024 decaps 46052 cycles 45891 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Intel Xeon 4th gen (c7i)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 13938 cycles 13510 cycles 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Intel Xeon 3rd gen (c6i)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 20326 cycles 20332 cycles 1.00
ML-KEM-512 encaps 27003 cycles 27006 cycles 1.00
ML-KEM-512 decaps 35839 cycles 35817 cycles 1.00
ML-KEM-768 keypair 34871 cycles 34902 cycles 1.00
ML-KEM-768 encaps 38156 cycles 38188 cycles 1.00
ML-KEM-768 decaps 50897 cycles 50921 cycles 1.00
ML-KEM-1024 keypair 47951 cycles 47959 cycles 1.00
ML-KEM-1024 encaps 54129 cycles 54141 cycles 1.00
ML-KEM-1024 decaps 71726 cycles 71706 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

AMD EPYC 3rd gen (c6a)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 18141 cycles 18182 cycles 1.00
ML-KEM-512 encaps 23186 cycles 23167 cycles 1.00
ML-KEM-512 decaps 30502 cycles 30499 cycles 1.00
ML-KEM-768 keypair 31068 cycles 31077 cycles 1.00
ML-KEM-768 encaps 34290 cycles 34170 cycles 1.00
ML-KEM-768 decaps 44732 cycles 44735 cycles 1.00
ML-KEM-1024 keypair 44601 cycles 44615 cycles 1.00
ML-KEM-1024 encaps 50030 cycles 49899 cycles 1.00
ML-KEM-1024 decaps 64385 cycles 64596 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton4

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 18134 cycles 18136 cycles 1.00
ML-KEM-512 encaps 22156 cycles 22155 cycles 1.00
ML-KEM-512 decaps 28792 cycles 28791 cycles 1.00
ML-KEM-768 keypair 30568 cycles 30577 cycles 1.00
ML-KEM-768 encaps 33642 cycles 33628 cycles 1.00
ML-KEM-768 decaps 43179 cycles 43172 cycles 1.00
ML-KEM-1024 keypair 44212 cycles 44209 cycles 1.00
ML-KEM-1024 encaps 49657 cycles 49656 cycles 1.00
ML-KEM-1024 decaps 62657 cycles 62654 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

AMD EPYC 4th gen (c7a)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 15075 cycles 15076 cycles 1.00
ML-KEM-512 encaps 19662 cycles 19669 cycles 1.00
ML-KEM-512 decaps 26309 cycles 26315 cycles 1.00
ML-KEM-768 keypair 25626 cycles 25657 cycles 1.00
ML-KEM-768 encaps 28169 cycles 28346 cycles 0.99
ML-KEM-768 decaps 37882 cycles 37882 cycles 1
ML-KEM-1024 keypair 35582 cycles 35562 cycles 1.00
ML-KEM-1024 encaps 40963 cycles 40972 cycles 1.00
ML-KEM-1024 decaps 54477 cycles 54551 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Intel Xeon 4th gen (c7i) (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 34816 cycles 34885 cycles 1.00
ML-KEM-512 encaps 45010 cycles 45061 cycles 1.00
ML-KEM-512 decaps 58830 cycles 58937 cycles 1.00
ML-KEM-768 keypair 59204 cycles 59143 cycles 1.00
ML-KEM-768 encaps 71934 cycles 71789 cycles 1.00
ML-KEM-768 decaps 89343 cycles 89311 cycles 1.00
ML-KEM-1024 keypair 87607 cycles 87536 cycles 1.00
ML-KEM-1024 encaps 104631 cycles 104555 cycles 1.00
ML-KEM-1024 decaps 127719 cycles 127461 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton3

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 18968 cycles 18966 cycles 1.00
ML-KEM-512 encaps 23557 cycles 23554 cycles 1.00
ML-KEM-512 decaps 30666 cycles 30663 cycles 1.00
ML-KEM-768 keypair 32301 cycles 32294 cycles 1.00
ML-KEM-768 encaps 35889 cycles 35886 cycles 1.00
ML-KEM-768 decaps 46036 cycles 46032 cycles 1.00
ML-KEM-1024 keypair 46628 cycles 46628 cycles 1
ML-KEM-1024 encaps 52447 cycles 52444 cycles 1.00
ML-KEM-1024 decaps 66248 cycles 66246 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton2

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 29023 cycles 29031 cycles 1.00
ML-KEM-512 encaps 35404 cycles 35415 cycles 1.00
ML-KEM-512 decaps 45887 cycles 45910 cycles 1.00
ML-KEM-768 keypair 49364 cycles 49362 cycles 1.00
ML-KEM-768 encaps 55584 cycles 55583 cycles 1.00
ML-KEM-768 decaps 70307 cycles 70305 cycles 1.00
ML-KEM-1024 keypair 72010 cycles 72056 cycles 1.00
ML-KEM-1024 encaps 80785 cycles 80834 cycles 1.00
ML-KEM-1024 decaps 100653 cycles 100705 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Arm Cortex-A55 (Snapdragon 888) benchmarks

Benchmark suite Current: 38291e9 Previous: c029444 Ratio
ML-KEM-512 keypair 58366 cycles 58329 cycles 1.00
ML-KEM-512 encaps 65800 cycles 65754 cycles 1.00
ML-KEM-512 decaps 84573 cycles 84580 cycles 1.00
ML-KEM-768 keypair 99012 cycles 98963 cycles 1.00
ML-KEM-768 encaps 110395 cycles 110404 cycles 1.00
ML-KEM-768 decaps 136719 cycles 136521 cycles 1.00
ML-KEM-1024 keypair 150248 cycles 150019 cycles 1.00
ML-KEM-1024 encaps 166300 cycles 166588 cycles 1.00
ML-KEM-1024 decaps 202548 cycles 202745 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Intel Xeon 3rd gen (c6i) (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 56604 cycles 56625 cycles 1.00
ML-KEM-512 encaps 69450 cycles 69468 cycles 1.00
ML-KEM-512 decaps 91391 cycles 91366 cycles 1.00
ML-KEM-768 keypair 91851 cycles 91850 cycles 1.00
ML-KEM-768 encaps 107752 cycles 108082 cycles 1.00
ML-KEM-768 decaps 136282 cycles 136476 cycles 1.00
ML-KEM-1024 keypair 134849 cycles 134953 cycles 1.00
ML-KEM-1024 encaps 155289 cycles 155389 cycles 1.00
ML-KEM-1024 decaps 191548 cycles 191534 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

AMD EPYC 3rd gen (c6a) (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 52132 cycles 52166 cycles 1.00
ML-KEM-512 encaps 65739 cycles 65740 cycles 1.00
ML-KEM-512 decaps 88413 cycles 88359 cycles 1.00
ML-KEM-768 keypair 84753 cycles 84747 cycles 1.00
ML-KEM-768 encaps 101521 cycles 101515 cycles 1.00
ML-KEM-768 decaps 132071 cycles 132116 cycles 1.00
ML-KEM-1024 keypair 124109 cycles 124399 cycles 1.00
ML-KEM-1024 encaps 145799 cycles 145968 cycles 1.00
ML-KEM-1024 decaps 183958 cycles 183658 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton4 (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 41973 cycles 41971 cycles 1.00
ML-KEM-512 encaps 50163 cycles 50164 cycles 1.00
ML-KEM-512 decaps 66048 cycles 66051 cycles 1.00
ML-KEM-768 keypair 69048 cycles 69057 cycles 1.00
ML-KEM-768 encaps 79759 cycles 79757 cycles 1.00
ML-KEM-768 decaps 101014 cycles 101018 cycles 1.00
ML-KEM-1024 keypair 102217 cycles 102218 cycles 1.00
ML-KEM-1024 encaps 117198 cycles 117190 cycles 1.00
ML-KEM-1024 decaps 143682 cycles 143738 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

AMD EPYC 4th gen (c7a) (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 45963 cycles 45728 cycles 1.01
ML-KEM-512 encaps 56869 cycles 56875 cycles 1.00
ML-KEM-512 decaps 76271 cycles 76254 cycles 1.00
ML-KEM-768 keypair 74521 cycles 74546 cycles 1.00
ML-KEM-768 encaps 88550 cycles 88586 cycles 1.00
ML-KEM-768 decaps 114384 cycles 114415 cycles 1.00
ML-KEM-1024 keypair 109391 cycles 109681 cycles 1.00
ML-KEM-1024 encaps 127230 cycles 127282 cycles 1.00
ML-KEM-1024 decaps 160191 cycles 160013 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton3 (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 45390 cycles 45390 cycles 1
ML-KEM-512 encaps 54215 cycles 54211 cycles 1.00
ML-KEM-512 decaps 71149 cycles 71145 cycles 1.00
ML-KEM-768 keypair 74823 cycles 74829 cycles 1.00
ML-KEM-768 encaps 86062 cycles 86058 cycles 1.00
ML-KEM-768 decaps 108808 cycles 108812 cycles 1.00
ML-KEM-1024 keypair 111110 cycles 111126 cycles 1.00
ML-KEM-1024 encaps 125943 cycles 125931 cycles 1.00
ML-KEM-1024 decaps 154635 cycles 154627 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Graviton2 (no-opt)

Benchmark suite Current: 38291e9 Previous: 96d4a1d Ratio
ML-KEM-512 keypair 71247 cycles 71255 cycles 1.00
ML-KEM-512 encaps 85057 cycles 85078 cycles 1.00
ML-KEM-512 decaps 112731 cycles 112754 cycles 1.00
ML-KEM-768 keypair 117309 cycles 117711 cycles 1.00
ML-KEM-768 encaps 135149 cycles 135362 cycles 1.00
ML-KEM-768 decaps 171777 cycles 171973 cycles 1.00
ML-KEM-1024 keypair 175301 cycles 174684 cycles 1.00
ML-KEM-1024 encaps 197349 cycles 196843 cycles 1.00
ML-KEM-1024 decaps 243598 cycles 243000 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Bananapi bpi-f3 benchmarks

Benchmark suite Current: 38291e9 Previous: c029444 Ratio
ML-KEM-512 keypair 335071 cycles 335085 cycles 1.00
ML-KEM-512 encaps 445603 cycles 445589 cycles 1.00
ML-KEM-512 decaps 593845 cycles 593799 cycles 1.00
ML-KEM-768 keypair 556092 cycles 556082 cycles 1.00
ML-KEM-768 encaps 698023 cycles 698006 cycles 1.00
ML-KEM-768 decaps 890340 cycles 890449 cycles 1.00
ML-KEM-1024 keypair 821435 cycles 821507 cycles 1.00
ML-KEM-1024 encaps 998099 cycles 998798 cycles 1.00
ML-KEM-1024 decaps 1230439 cycles 1229487 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

@oqs-bot
Copy link

Choose a reason for hiding this comment

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

Arm Cortex-A72 (Raspberry Pi 4) benchmarks

Benchmark suite Current: 38291e9 Previous: 7f321d9 Ratio
ML-KEM-512 keypair 51698 cycles 51532 cycles 1.00
ML-KEM-512 encaps 58463 cycles 58093 cycles 1.01
ML-KEM-512 decaps 74151 cycles 74233 cycles 1.00
ML-KEM-768 keypair 87573 cycles 87474 cycles 1.00
ML-KEM-768 encaps 96347 cycles 95486 cycles 1.01
ML-KEM-768 decaps 119689 cycles 119246 cycles 1.00
ML-KEM-1024 keypair 132594 cycles 131448 cycles 1.01
ML-KEM-1024 encaps 144977 cycles 143807 cycles 1.01
ML-KEM-1024 decaps 175791 cycles 175612 cycles 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.