Skip to content

Commit

Permalink
Merge pull request #573 from pq-code-package/elimiate-click
Browse files Browse the repository at this point in the history
  • Loading branch information
mkannwischer authored Dec 23, 2024
2 parents 84bdac8 + 19990c5 commit 2a6999e
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 314 deletions.
10 changes: 1 addition & 9 deletions .github/actions/setup-apt/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,9 @@ runs:
- name: Install base packages
shell: bash
run: |
${{ inputs.sudo }} apt-get install python3-venv python3-pip make -y
${{ inputs.sudo }} apt-get install make gcc python3 -y
- name: Install additional packages
if: ${{ inputs.packages != ''}}
shell: bash
run: |
${{ inputs.sudo }} apt-get install ${{ inputs.packages }} -y
- name: Setup Python venv
shell: bash
run: |
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
deactivate
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
10 changes: 1 addition & 9 deletions .github/actions/setup-yum/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,9 @@ runs:
- name: Install base packages
shell: bash
run: |
${{ inputs.sudo }} yum install make git python3-pip -y
${{ inputs.sudo }} pip3 install virtualenv
${{ inputs.sudo }} yum install make gcc python3 git -y
- name: Install additional packages
if: ${{ inputs.packages != ''}}
shell: bash
run: |
${{ inputs.sudo }} yum install ${{ inputs.packages }} -y
- name: Setup Python venv
shell: bash
run: |
virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"
6 changes: 1 addition & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ updates:
directory: /
schedule:
interval: monthly

- package-ecosystem: pip
directory: /
schedule:
interval: monthly

9 changes: 1 addition & 8 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@

### Prerequisites

To build **mlkem-native**, you need `make` and a C90 compiler. To use the test scripts, you need Python3 with
dependencies as specified in [requirements.txt](requirements.txt). We recommend using a virtual environment, e.g.:

```bash
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
source venv/bin/activate
```
To build **mlkem-native**, you need `make` and a C90 compiler. To use the test scripts, you need Python3 (>= 3.7).

### Using `make`

Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ cd mlkem-native

# Install base packages
sudo apt-get update
sudo apt-get install python3-venv python3-pip make

# Setup Python environment
python3 -m venv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
sudo apt-get install make gcc python3

# Build and run base tests
make quickcheck
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

Loading

18 comments on commit 2a6999e

@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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 29018 cycles 29017 cycles 1.00
ML-KEM-512 encaps 35400 cycles 35398 cycles 1.00
ML-KEM-512 decaps 45888 cycles 45885 cycles 1.00
ML-KEM-768 keypair 49352 cycles 49339 cycles 1.00
ML-KEM-768 encaps 55577 cycles 55569 cycles 1.00
ML-KEM-768 decaps 70338 cycles 70328 cycles 1.00
ML-KEM-1024 keypair 72069 cycles 72069 cycles 1
ML-KEM-1024 encaps 80843 cycles 80844 cycles 1.00
ML-KEM-1024 decaps 100672 cycles 100677 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 13518 cycles 13535 cycles 1.00
ML-KEM-512 encaps 17308 cycles 17350 cycles 1.00
ML-KEM-512 decaps 22835 cycles 22910 cycles 1.00
ML-KEM-768 keypair 22554 cycles 22543 cycles 1.00
ML-KEM-768 encaps 24546 cycles 24521 cycles 1.00
ML-KEM-768 decaps 32677 cycles 32609 cycles 1.00
ML-KEM-1024 keypair 31433 cycles 31373 cycles 1.00
ML-KEM-1024 encaps 35004 cycles 34925 cycles 1.00
ML-KEM-1024 decaps 45875 cycles 45883 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 18154 cycles 18138 cycles 1.00
ML-KEM-512 encaps 23210 cycles 23196 cycles 1.00
ML-KEM-512 decaps 30553 cycles 30512 cycles 1.00
ML-KEM-768 keypair 31115 cycles 31094 cycles 1.00
ML-KEM-768 encaps 34234 cycles 34236 cycles 1.00
ML-KEM-768 decaps 44898 cycles 44748 cycles 1.00
ML-KEM-1024 keypair 44642 cycles 44679 cycles 1.00
ML-KEM-1024 encaps 49928 cycles 49901 cycles 1.00
ML-KEM-1024 decaps 64460 cycles 64573 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)

Benchmark suite Current: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 20322 cycles 20325 cycles 1.00
ML-KEM-512 encaps 26993 cycles 27001 cycles 1.00
ML-KEM-512 decaps 35814 cycles 35822 cycles 1.00
ML-KEM-768 keypair 34885 cycles 34883 cycles 1.00
ML-KEM-768 encaps 38175 cycles 38178 cycles 1.00
ML-KEM-768 decaps 50915 cycles 50920 cycles 1.00
ML-KEM-1024 keypair 47945 cycles 47959 cycles 1.00
ML-KEM-1024 encaps 54130 cycles 54094 cycles 1.00
ML-KEM-1024 decaps 71687 cycles 71687 cycles 1

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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 34973 cycles 34847 cycles 1.00
ML-KEM-512 encaps 44835 cycles 45080 cycles 0.99
ML-KEM-512 decaps 58584 cycles 58969 cycles 0.99
ML-KEM-768 keypair 59169 cycles 59111 cycles 1.00
ML-KEM-768 encaps 71398 cycles 71787 cycles 0.99
ML-KEM-768 decaps 89101 cycles 89310 cycles 1.00
ML-KEM-1024 keypair 87788 cycles 87395 cycles 1.00
ML-KEM-1024 encaps 104189 cycles 104584 cycles 1.00
ML-KEM-1024 decaps 126816 cycles 127599 cycles 0.99

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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 52243 cycles 52203 cycles 1.00
ML-KEM-512 encaps 65838 cycles 65806 cycles 1.00
ML-KEM-512 decaps 88425 cycles 88407 cycles 1.00
ML-KEM-768 keypair 84853 cycles 84781 cycles 1.00
ML-KEM-768 encaps 101483 cycles 101469 cycles 1.00
ML-KEM-768 decaps 132219 cycles 132123 cycles 1.00
ML-KEM-1024 keypair 124169 cycles 124011 cycles 1.00
ML-KEM-1024 encaps 145812 cycles 145953 cycles 1.00
ML-KEM-1024 decaps 183788 cycles 183659 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 29020 cycles 29019 cycles 1.00
ML-KEM-512 encaps 35400 cycles 35402 cycles 1.00
ML-KEM-512 decaps 45887 cycles 45888 cycles 1.00
ML-KEM-768 keypair 49364 cycles 49359 cycles 1.00
ML-KEM-768 encaps 55578 cycles 55582 cycles 1.00
ML-KEM-768 decaps 70303 cycles 70299 cycles 1.00
ML-KEM-1024 keypair 72010 cycles 72010 cycles 1
ML-KEM-1024 encaps 80787 cycles 80785 cycles 1.00
ML-KEM-1024 decaps 100655 cycles 100659 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 15074 cycles 15160 cycles 0.99
ML-KEM-512 encaps 19660 cycles 19662 cycles 1.00
ML-KEM-512 decaps 26313 cycles 26319 cycles 1.00
ML-KEM-768 keypair 25638 cycles 25630 cycles 1.00
ML-KEM-768 encaps 28213 cycles 28183 cycles 1.00
ML-KEM-768 decaps 37871 cycles 38040 cycles 1.00
ML-KEM-1024 keypair 35567 cycles 35601 cycles 1.00
ML-KEM-1024 encaps 41032 cycles 40976 cycles 1.00
ML-KEM-1024 decaps 54464 cycles 54475 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 56570 cycles 56574 cycles 1.00
ML-KEM-512 encaps 69417 cycles 69459 cycles 1.00
ML-KEM-512 decaps 91351 cycles 91364 cycles 1.00
ML-KEM-768 keypair 91794 cycles 91851 cycles 1.00
ML-KEM-768 encaps 107707 cycles 107798 cycles 1.00
ML-KEM-768 decaps 136291 cycles 136335 cycles 1.00
ML-KEM-1024 keypair 134690 cycles 134728 cycles 1.00
ML-KEM-1024 encaps 155159 cycles 155213 cycles 1.00
ML-KEM-1024 decaps 191615 cycles 191515 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 58374 cycles 58392 cycles 1.00
ML-KEM-512 encaps 65799 cycles 65793 cycles 1.00
ML-KEM-512 decaps 84574 cycles 84549 cycles 1.00
ML-KEM-768 keypair 99051 cycles 99156 cycles 1.00
ML-KEM-768 encaps 110499 cycles 110374 cycles 1.00
ML-KEM-768 decaps 136789 cycles 137616 cycles 0.99
ML-KEM-1024 keypair 150355 cycles 150209 cycles 1.00
ML-KEM-1024 encaps 166584 cycles 166648 cycles 1.00
ML-KEM-1024 decaps 203154 cycles 202380 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 18135 cycles 18139 cycles 1.00
ML-KEM-512 encaps 22155 cycles 22154 cycles 1.00
ML-KEM-512 decaps 28792 cycles 28791 cycles 1.00
ML-KEM-768 keypair 30575 cycles 30570 cycles 1.00
ML-KEM-768 encaps 33626 cycles 33633 cycles 1.00
ML-KEM-768 decaps 43168 cycles 43175 cycles 1.00
ML-KEM-1024 keypair 44212 cycles 44210 cycles 1.00
ML-KEM-1024 encaps 49661 cycles 49661 cycles 1
ML-KEM-1024 decaps 62654 cycles 62653 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 18967 cycles 18967 cycles 1
ML-KEM-512 encaps 23554 cycles 23554 cycles 1
ML-KEM-512 decaps 30662 cycles 30665 cycles 1.00
ML-KEM-768 keypair 32296 cycles 32293 cycles 1.00
ML-KEM-768 encaps 35887 cycles 35890 cycles 1.00
ML-KEM-768 decaps 46028 cycles 46033 cycles 1.00
ML-KEM-1024 keypair 46632 cycles 46626 cycles 1.00
ML-KEM-1024 encaps 52448 cycles 52445 cycles 1.00
ML-KEM-1024 decaps 66244 cycles 66245 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 45720 cycles 45724 cycles 1.00
ML-KEM-512 encaps 56854 cycles 56857 cycles 1.00
ML-KEM-512 decaps 76254 cycles 76236 cycles 1.00
ML-KEM-768 keypair 74533 cycles 74512 cycles 1.00
ML-KEM-768 encaps 88554 cycles 88566 cycles 1.00
ML-KEM-768 decaps 114717 cycles 114371 cycles 1.00
ML-KEM-1024 keypair 109401 cycles 109426 cycles 1.00
ML-KEM-1024 encaps 127251 cycles 127309 cycles 1.00
ML-KEM-1024 decaps 160186 cycles 160035 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 41969 cycles 41959 cycles 1.00
ML-KEM-512 encaps 50159 cycles 50162 cycles 1.00
ML-KEM-512 decaps 66046 cycles 66048 cycles 1.00
ML-KEM-768 keypair 69052 cycles 69052 cycles 1
ML-KEM-768 encaps 79762 cycles 79761 cycles 1.00
ML-KEM-768 decaps 101016 cycles 101017 cycles 1.00
ML-KEM-1024 keypair 102494 cycles 102205 cycles 1.00
ML-KEM-1024 encaps 117443 cycles 117207 cycles 1.00
ML-KEM-1024 decaps 143360 cycles 143696 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 71263 cycles 71257 cycles 1.00
ML-KEM-512 encaps 85063 cycles 85073 cycles 1.00
ML-KEM-512 decaps 112746 cycles 112756 cycles 1.00
ML-KEM-768 keypair 117457 cycles 117424 cycles 1.00
ML-KEM-768 encaps 135205 cycles 135180 cycles 1.00
ML-KEM-768 decaps 171792 cycles 171795 cycles 1.00
ML-KEM-1024 keypair 175044 cycles 174627 cycles 1.00
ML-KEM-1024 encaps 197121 cycles 196786 cycles 1.00
ML-KEM-1024 decaps 243355 cycles 242801 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 45385 cycles 45391 cycles 1.00
ML-KEM-512 encaps 54215 cycles 54219 cycles 1.00
ML-KEM-512 decaps 71141 cycles 71155 cycles 1.00
ML-KEM-768 keypair 74823 cycles 74822 cycles 1.00
ML-KEM-768 encaps 86063 cycles 86055 cycles 1.00
ML-KEM-768 decaps 108813 cycles 108797 cycles 1.00
ML-KEM-1024 keypair 111138 cycles 111123 cycles 1.00
ML-KEM-1024 encaps 125930 cycles 125928 cycles 1.00
ML-KEM-1024 decaps 154621 cycles 154616 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 335136 cycles 335097 cycles 1.00
ML-KEM-512 encaps 445839 cycles 445748 cycles 1.00
ML-KEM-512 decaps 593939 cycles 593813 cycles 1.00
ML-KEM-768 keypair 556231 cycles 556254 cycles 1.00
ML-KEM-768 encaps 698098 cycles 698083 cycles 1.00
ML-KEM-768 decaps 889950 cycles 889797 cycles 1.00
ML-KEM-1024 keypair 821804 cycles 821794 cycles 1.00
ML-KEM-1024 encaps 999199 cycles 999321 cycles 1.00
ML-KEM-1024 decaps 1230148 cycles 1230188 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: 2a6999e Previous: 84bdac8 Ratio
ML-KEM-512 keypair 51911 cycles 51941 cycles 1.00
ML-KEM-512 encaps 59459 cycles 59357 cycles 1.00
ML-KEM-512 decaps 74578 cycles 75134 cycles 0.99
ML-KEM-768 keypair 88386 cycles 87839 cycles 1.01
ML-KEM-768 encaps 96971 cycles 96730 cycles 1.00
ML-KEM-768 decaps 119961 cycles 118986 cycles 1.01
ML-KEM-1024 keypair 131773 cycles 131265 cycles 1.00
ML-KEM-1024 encaps 144208 cycles 144874 cycles 1.00
ML-KEM-1024 decaps 176244 cycles 175688 cycles 1.00

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

Please sign in to comment.