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

Update OR-Tools to v9.11 #88

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions .github/workflows/test_basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
strategy:
matrix:
runs-on: macos-latest
strategy:
matrix:
target: [slothy.targets.arm_v7m.cortex_m7,slothy.targets.arm_v81m.cortex_m55r1, slothy.targets.arm_v81m.cortex_m85r1, slothy.targets.aarch64.cortex_a55, slothy.targets.aarch64.cortex_a72_frontend, slothy.targets.aarch64.apple_m1_firestorm_experimental, slothy.targets.aarch64.apple_m1_icestorm_experimental]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
Expand All @@ -31,9 +34,12 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
Expand All @@ -48,9 +54,12 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
Expand All @@ -65,43 +74,52 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --examples ntt_kyber_1_23_45_67_m55,ntt_dilithium_12_34_56_78_m55 --timeout=300
python3 example.py --examples ntt_kyber_1_23_45_67_m55,ntt_dilithium_12_34_56_78_m55 --timeout=1200
examples_ntt_kyber_dilithium_neon_core:
if: ${{ github.event.label.name == 'needs-ci' ||
github.event.pull_request.user.login == 'hanno-becker' ||
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
./venv/bin/python3 -m pip install -r requirements.txt
echo BASH_ENV="./venv/bin/activate" >> $GITHUB_ENV
- name: Run examples
run: |
python3 example.py --examples ntt_kyber_123_4567_a55,ntt_dilithium_123_45678_a55 --timeout=300
python3 example.py --examples ntt_kyber_123_4567_a55,ntt_dilithium_123_45678_a55 --timeout=1200
sqmag:
if: ${{ github.event.label.name == 'needs-ci' ||
github.event.pull_request.user.login == 'hanno-becker' ||
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
Expand All @@ -116,9 +134,12 @@ jobs:
github.event.pull_request.user.login == 'dop-amin' ||
github.event.pull_request.user.login == 'mkannwischer'
}}
runs-on: ubuntu-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install python dependencies
run: |
python3 -m venv venv
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy==1.26.4
ortools==9.7.2996
ortools==9.11.4210
pandas==2.1.1
sympy==1.12
4 changes: 3 additions & 1 deletion slothy/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3322,6 +3322,8 @@ def _init_external_model_and_solver(self):
self._model.cp_solver = cp_model.CpSolver()
self._model.cp_solver.random_seed = self.config.solver_random_seed

self._model.cp_solver.parameters.num_workers = 16

def _NewIntVar(self, minval, maxval, name=""): # pylint:disable=invalid-name
r = self._model.cp_model.NewIntVar(minval,maxval, name)
self._model.variables.append(r)
Expand Down Expand Up @@ -3413,7 +3415,7 @@ def is_good_enough( cur, bound ):
cur <= self.config.objective_lower_bound:
self.logger.info("Reached user-defined objective_lower_bound ... stop")
return True
return False
return True

solution_cb = SlothyBase.CpSatSolutionCb(self.logger,self._model.objective_name,
self.config.max_solutions,
Expand Down