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

Atomics #9

Open
wants to merge 93 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
ad0dac0
Use atomics for refcounting.
Kerilk Dec 8, 2021
1b6db17
Add thread safety to objects callbacks.
Kerilk Dec 8, 2021
5871a78
Add thread safety to string hyperparameters.
Kerilk Dec 8, 2021
2b1e269
Document rng thread safety.
Kerilk Dec 8, 2021
ca9195a
Document context thread safety.
Kerilk Dec 8, 2021
d4fc977
Document distribution thread safety.
Kerilk Dec 8, 2021
6a9e53e
Document expression thread safety.
Kerilk Dec 8, 2021
e935598
Limit the number of use of _generate_constraints.
Kerilk Dec 8, 2021
17221a1
Make ccs_object_set_user_data and ccs_object_get_user_data thread safe.
Kerilk May 26, 2022
61d70a1
Fix typo and style.
Kerilk May 26, 2022
d89e082
Remove ccs_fini
Kerilk May 18, 2023
ed461e2
Document object (de)serialization thread safety.
Kerilk May 18, 2023
48f50b7
Fix style.
Kerilk May 18, 2023
38bd2b9
Added more documentation about thread safety.
Kerilk May 18, 2023
4fe5a9e
Revert "Remove ccs_fini"
Kerilk May 18, 2023
375fe15
Add reference counting to library initialization and deinitialization.
Kerilk May 18, 2023
51576d7
Add compile flag and macros to create thread safe version of the libr…
Kerilk Jun 23, 2023
b01810a
Context parameters are now immutable. Contexts can now be thread safe.
Kerilk Jun 28, 2023
5d58f15
Test tread safe version in CI.
Kerilk Jun 28, 2023
35c645c
Bindings are now immutable and thus thread safe.
Kerilk Jul 3, 2023
c5b0a5f
Configuration space can be empty
Kerilk Jul 7, 2023
64817c7
Features space and objective space can also be empty.
Kerilk Jul 7, 2023
3e8940e
More cleanup.
Kerilk Jul 7, 2023
1c416a5
Objective space are now immutable.
Kerilk Jul 7, 2023
14a625b
Made tuner and feature tuners thread safe.
Kerilk Aug 16, 2023
c7e1442
Made rngs, distributions, and maps thread safe.
Kerilk Aug 22, 2023
b46756e
Work around issues with helgrind and statically initialized and unuse…
Kerilk Aug 24, 2023
03d5a7a
Fix style.
Kerilk Aug 24, 2023
c12cc2a
Use atomics to access objects' user_data.
Kerilk Aug 24, 2023
9ecd94d
Fix bug!
Kerilk Aug 24, 2023
a445beb
Add CI with valgrind on MacOS.
Kerilk Aug 24, 2023
18bb41a
Deactivate valgrind on MacOS as it is not supported anymore.
Kerilk Aug 24, 2023
543edba
CI refactoring.
Kerilk Aug 24, 2023
76ada76
Fix void argument prototypes.
Kerilk Aug 25, 2023
91c3f9f
Fix clang dwarf version for valgrind.
Kerilk Aug 25, 2023
ba548e7
Enable strict on MacOS.
Kerilk Aug 25, 2023
f672e66
Fixed leaks in Python test, and upgrade ruby to use same strategy.
Kerilk Sep 7, 2023
e1c738c
Added distribution space abstraction, allowing configuration space to…
Kerilk Sep 26, 2023
5058a45
Forbidden clauses are now given at configuration space creation.
Kerilk Nov 3, 2023
e6ef739
Conditions are now specified at configuration space creation.
Kerilk Nov 3, 2023
5d92a92
Lock for user data since serialize locks objects when reading it.
Kerilk Nov 7, 2023
b57efe0
Refactored ccs_configuration_space_sample and ccs_configuration_space…
Kerilk Nov 7, 2023
95a36e1
Add rng to as an option to ccs_configuration_space_sample and ccs_con…
Kerilk Nov 7, 2023
4962aef
Bumped version number.
Kerilk Mar 13, 2024
06c77a0
Update GitHub actions.
Kerilk Mar 13, 2024
923787a
Make python bindings compatible with parglare v0.13.0+.
Kerilk Mar 13, 2024
315ce32
Make error_stack thread safe.
Kerilk Mar 13, 2024
82d8ddd
Make thread safe default.
Kerilk Mar 13, 2024
d2c3a65
Consistency between VERSION and github tags.
Kerilk Mar 13, 2024
bc7bdd4
Remove obsolete macro.
Kerilk Mar 13, 2024
40ad86c
Expressions are evaluated over bindings and validated on contexts.
Kerilk Mar 21, 2024
cfa3a22
Remove duplicated functions.
Kerilk Mar 22, 2024
f8b3f1f
Refactoring evaluations.
Kerilk Mar 22, 2024
7750a5b
Add rng as part of the configuration space constructor, making these …
Kerilk Mar 26, 2024
959dd0b
Renamed features space to feature space.
Kerilk Mar 27, 2024
07b698c
Object validation macro refactoring.
Kerilk May 7, 2024
d5d63ac
Refactored tests.
Kerilk May 7, 2024
11128a0
Fix for MacOS CI on GitHub.
Kerilk May 7, 2024
32ab6b1
Refactor object deserialization.
Kerilk May 7, 2024
7fb7597
Objective space now contains the search space.
Kerilk May 8, 2024
46edbe4
Add and use macros to get expression or parameter type.
Kerilk May 8, 2024
8220442
Further refactor expressions.
Kerilk May 8, 2024
f080e5e
Unified tuner and tree_tuner as well as Evaluation and TreeEvaluation…
Kerilk May 9, 2024
79a6622
Prevent parameters inclusion in several contexts.
Kerilk May 10, 2024
bd2b562
Feature spaces are now part of configuration spaces.
Kerilk May 13, 2024
6dc003a
Consistently use _ccs_object_serialize_with_opts and _ccs_object_seri…
Kerilk May 20, 2024
2582691
Factor user data serialization.
Kerilk May 20, 2024
a6a9cff
Factor object user data serialization.
Kerilk May 20, 2024
45963e5
Factor object internal deserialization an handle mapping.
Kerilk May 20, 2024
ed997ab
Factored internal object serialization.
Kerilk May 20, 2024
36d35b2
Use checkpoint in maps to restore map state after error.
Kerilk May 21, 2024
9d14e43
Expressions in configuration and objective spaces can now depend on p…
Kerilk May 21, 2024
fa807c4
Fix documentation.
Kerilk May 21, 2024
e331c34
Remove *_get_num_* as they were redundant, refactor ruby meta-methods.
Kerilk May 24, 2024
f1e851e
Fix user defined tuner delete.
Kerilk Jul 9, 2024
0c0e487
Use explicit ref-counting for user defined object data.
Kerilk Jul 8, 2024
2ec5ba0
Change deserialize ABI to be callable before user object creation.
Kerilk Jul 9, 2024
7d9c901
Rely on ffi for vector refcounting.
Kerilk Jul 12, 2024
04e867e
Use vector dispatcher callback for user defined objects.
Kerilk Jul 12, 2024
da387f7
User defined expression.
Kerilk Aug 21, 2024
066fd52
Absolute path to library for hardened macos builds.
Aug 27, 2024
77e6436
Enable strict on recent ubuntu builds.
Kerilk Aug 27, 2024
329bb57
Add CCS_DESERIALIZE_OPTION_MAP_HANDLES option. Fix map bug in ruby.
Kerilk Oct 2, 2024
95a2756
Implement xmlrpc tuner server.
Kerilk Oct 2, 2024
c9f323a
Update Kokkos profiling headers to version 4.4.01.
Kerilk Oct 4, 2024
469acf6
ccs_init is called at the end of binding initialization.
Kerilk Oct 4, 2024
08fbbc3
Rename `size_history` to `history_size`.
Kerilk Oct 7, 2024
58d5f80
Features are created valid and immutable.
Kerilk Oct 10, 2024
1e8ad1d
Check that evaluations are valid.
Kerilk Oct 10, 2024
cd778f6
Evaluations in error should still be accounted for in the history.
Kerilk Oct 10, 2024
ccbd8e2
Evaluations are immutable and created valid.
Kerilk Oct 11, 2024
c88992a
Configurations are immutable and validated at construction.
Kerilk Oct 11, 2024
1e00868
Tree configurations are immutable and created valid.
Kerilk Oct 11, 2024
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
140 changes: 36 additions & 104 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,127 +18,51 @@ jobs:
build-and-check:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check ${{ matrix.os }}
name: Build and Check ${{ matrix.os }} ${{ matrix.compiler }}${{ matrix.threadsafe && ' ' || ' No Thread Safe' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
threadsafe: [true, false]
compiler: [gcc, g++, clang]
exclude:
- os: macos-latest
compiler: g++

steps:
- uses: actions/checkout@v3
- run: sudo apt update; sudo apt install -y gcc ruby-dev libgsl-dev python3-dev
- uses: actions/checkout@v4
- run: sudo apt update; sudo apt install -y ${{ matrix.compiler }} ruby-dev libgsl-dev python3-dev valgrind
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare==0.12.0
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
working-directory: build
- run: make -j
working-directory: build
- run: make -j check
working-directory: build
- uses: actions/upload-artifact@v2
if: failure()
- uses: actions/setup-python@v5
with:
name: build-and-check
path: |
build/**/*.log
build/config.log

build-and-check-cxx:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check C++ ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- run: sudo apt-get update
- run: sudo apt-get install -y gcc g++ ruby-dev libgsl-dev python3-dev
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare==0.12.0
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle xmlrpc
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict CC=g++
- run: ../configure --enable-strict${{ matrix.threadsafe && ' --enable-thread-safe' || ' --disable-thread-safe' }} CC=${{ matrix.compiler }}${{ (matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest') && ' CFLAGS="-gdwarf-4 -O2"' || '' }}
working-directory: build
- run: make -j
working-directory: build
- run: make -j check
working-directory: build
- uses: actions/upload-artifact@v2
if: failure()
with:
name: build-and-check
path: |
build/**/*.log
build/config.log

build-and-check-clang:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check clang ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- run: sudo apt-get update
- run: sudo apt-get install -y clang ruby-dev libgsl-dev python3-dev
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare==0.12.0
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure CC=clang
working-directory: build
- run: make -j
- run: make -j check-valgrind-memcheck
working-directory: build
- run: make -j check
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: make -j check-valgrind-helgrind
working-directory: build
- uses: actions/upload-artifact@v2
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: actions/upload-artifact@v4
if: failure()
with:
name: build-and-check
path: |
build/**/*.log
build/config.log

build-and-check-valgrind:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check Valgrind ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v3
- run: sudo apt-get update
- run: sudo apt-get install -y gcc valgrind ruby-dev libgsl-dev python3-dev
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
working-directory: build
- run: make -j
working-directory: build
- run: make -j check-valgrind
working-directory: build
- uses: actions/upload-artifact@v2
if: failure()
with:
name: build-and-check-valgrind
path: |
build/**/*.log
build/config.log

distcheck:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
Expand All @@ -149,13 +73,17 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt update; sudo apt install -y gcc ruby-dev libgsl-dev python3-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare==0.12.0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle xmlrpc
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
Expand All @@ -173,13 +101,17 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- run: sudo apt update; sudo apt install -y gcc ruby-dev libgsl-dev python3-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- uses: actions/setup-python@v5
with:
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare==0.12.0
- run: gem install --user-install rake ffi ffi-value whittle xmlrpc
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
Expand Down
Loading
Loading