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

Use SIMDe #22

Merged
merged 116 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 112 commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
d4a5791
Replaced intrinsic by builtin for popcount
hivert Oct 23, 2023
282ec03
Imported simde
hivert Oct 23, 2023
eb84cee
Switch to simde
hivert Oct 23, 2023
c95624b
Finish switching to SIMDe
james-d-mitchell Oct 24, 2023
4835ca9
Switch to C++14
james-d-mitchell Oct 24, 2023
06736d9
Stop using deprecated std::random_shuffle
james-d-mitchell Oct 24, 2023
8abef2b
Move testtools.hpp into benchmark/
james-d-mitchell Oct 24, 2023
d5beea9
tests: remove pointless test files
james-d-mitchell Oct 24, 2023
3a1843f
tests: stop using boost tests
james-d-mitchell Oct 24, 2023
4ab972a
Update ci to use catch2
james-d-mitchell Oct 24, 2023
a0a1c8a
Remove -mavx flag + bump cmake to 3.8
james-d-mitchell Oct 26, 2023
cfa7d03
Add some static cast for compilation on arm with gcc
james-d-mitchell Oct 26, 2023
9b86198
ci: remove apt install of catch2
james-d-mitchell Oct 26, 2023
cd485f7
Test for and cond. use -march/tune=native
james-d-mitchell Oct 26, 2023
fe873bd
Arch checking
hivert Oct 27, 2023
e760ee8
benchmarks: convert to catch2
james-d-mitchell Oct 27, 2023
4949985
Fixup bench -> catch2
james-d-mitchell Oct 27, 2023
5b48274
Rollback some changes
reiniscirpons Oct 27, 2023
82a9d25
ci: use multiple versions of gcc
james-d-mitchell Oct 27, 2023
e9b5eb3
Implemented is_permutation and permutation_of for non x86 arch
hivert Oct 27, 2023
3c9d041
Changed char -> int8_t
hivert Oct 27, 2023
71f704b
Inverse find form PPerm16 and Perm16
hivert Oct 27, 2023
f69a3af
Formatting
james-d-mitchell Oct 27, 2023
b3d55aa
Linting
james-d-mitchell Oct 27, 2023
5ce40c2
Start using C++17
james-d-mitchell Oct 27, 2023
b4f1dda
Wrote a catch matcher for equality of epu8
hivert Oct 27, 2023
a9151f3
Change printing of vectors from [] to {}
hivert Oct 27, 2023
a60d5e1
Update circleci job
reiniscirpons Oct 27, 2023
9fa9d74
Ref implem of image_mask
hivert Oct 27, 2023
d050675
Merge
hivert Oct 27, 2023
d59bf8f
REQUIRE_THAT(..., Equals(...)) everywhere
hivert Oct 27, 2023
62a38dd
Reinstated commented out test in bmat8
hivert Oct 27, 2023
95b1b63
All test reinstated & pass on x86_64
hivert Oct 28, 2023
ad6ac85
Reformating
hivert Oct 28, 2023
137224a
constexpr backward compat cleanup
hivert Oct 28, 2023
a9db482
constexpr backward compat cleanup in build files
hivert Oct 28, 2023
63a54cc
Removed HPCombi-Config system
hivert Oct 28, 2023
3dd3ad4
Fixup
hivert Oct 28, 2023
c38cc9b
Updated Doxygen config file
hivert Oct 29, 2023
80eedee
Fix spelling
hivert Oct 29, 2023
27ab45e
Doc improvements
hivert Oct 29, 2023
c904286
Tests improvements (TEST_AGREES_EPU8_FUN)
hivert Oct 29, 2023
5a07f2f
Formatting
james-d-mitchell Oct 29, 2023
0f76708
Add missing include for sstream
james-d-mitchell Oct 29, 2023
967de58
Remove redundant cmake stuff
james-d-mitchell Oct 29, 2023
fa8088e
REQUIRE -> CHECK
hivert Oct 29, 2023
9a488f7
Removed unused type argument to TEST_AGREES macros
hivert Oct 29, 2023
97777b8
Change Size -> size mem fn
james-d-mitchell Oct 29, 2023
b9375fd
Remove names starting with underscore
james-d-mitchell Oct 29, 2023
50abc5f
Fix spelling
james-d-mitchell Oct 29, 2023
69ec3d6
Reorganise header directories
james-d-mitchell Oct 29, 2023
5c06113
Remove extraneous files
james-d-mitchell Oct 29, 2023
d2f6ef7
implicit constructor
hivert Oct 29, 2023
2e2903d
Updated benchmark with directory reorg
hivert Oct 29, 2023
4d14b5c
Use HPCOMBI_ASSERT everywhere
james-d-mitchell Oct 29, 2023
2383a0b
Remove * + iwyu
james-d-mitchell Oct 29, 2023
a44eeda
BMat8 benchmark done
hivert Oct 29, 2023
cb7f270
Added missing include to simde/x86/sse4.2.h
hivert Oct 29, 2023
f4f8dc2
Updated README.md
hivert Oct 29, 2023
758a862
Update Doxyfile.in
james-d-mitchell Oct 29, 2023
81d6cd9
Remove some libsemigroups remnants
james-d-mitchell Oct 29, 2023
4ba3cf6
Remove travis badge from README.md
james-d-mitchell Oct 29, 2023
232796b
Fix typo in the doc
james-d-mitchell Oct 29, 2023
8f085ec
noexcept in epu
hivert Oct 29, 2023
74bf69a
Noexcept bmat8
james-d-mitchell Oct 29, 2023
4ab6377
Formatting
james-d-mitchell Oct 29, 2023
aead6d4
Remove random_shuffle
james-d-mitchell Oct 29, 2023
02dbb8c
Epu8 benchmark started
james-d-mitchell Oct 29, 2023
fca0c0b
Fixed examples/* wrt new directories
hivert Oct 29, 2023
1551913
Add missing file
james-d-mitchell Oct 30, 2023
4d4c72c
Updated benchmark for Perm16
hivert Oct 30, 2023
8d401cd
Fixed .codespellrc wrt simde
hivert Oct 31, 2023
31d797d
Rearrange bench_epu8 a little
james-d-mitchell Oct 31, 2023
4309f36
Use different rank default on arm
james-d-mitchell Oct 31, 2023
e9c12e8
Add missing copy constructors + improved benchmark
hivert Nov 1, 2023
32ce1be
Add benchmark plot script
james-d-mitchell Nov 1, 2023
949e41c
Finalize bench_epu8
james-d-mitchell Nov 1, 2023
2d04dc4
Handling combinatorial explosion in BENCHMARK_...
hivert Nov 1, 2023
d8359e7
Merge branch 'simde' of github.com:libsemigroups/HPCombi into simde
hivert Nov 1, 2023
f14a337
Finalize bench_epu8
james-d-mitchell Nov 1, 2023
825841a
Move old benchmark stuff into experiments
james-d-mitchell Nov 1, 2023
7644826
Remove unescessary copy constr. and op=
hivert Nov 1, 2023
5a28290
Suppressed g++ wrong warnings -Wstringop-overflow
hivert Nov 1, 2023
9f14f46
Basic rewrite of benchmark plot generator
reiniscirpons Nov 2, 2023
eeb2b41
Improve plot generation
reiniscirpons Nov 2, 2023
1871e43
Merge pull request #33 from reiniscirpons/improve-plots
reiniscirpons Nov 2, 2023
a58d628
New implem is_permutation_eval
hivert Nov 2, 2023
2a6e3dc
Add features for displaying speedup and naming plots to benchmark plo…
reiniscirpons Nov 2, 2023
ad56ebb
Merge + IsSorted matcher
hivert Nov 5, 2023
1d7920a
Remumbered the tests
hivert Nov 5, 2023
d338ad0
Renamed epu.hpp -> epu8.hpp
hivert Nov 5, 2023
be2f558
Silenced clang complaining about gcc -Wstringop-overflow
hivert Nov 5, 2023
c298c95
Preparing for xpu/perm32:
hivert Nov 5, 2023
1336a65
Fix inclusion guard for epu8.hpp
hivert Nov 5, 2023
cbe29f3
epu8 conversion is now fully generic
hivert Nov 5, 2023
815acef
Check for required compiler flags and builtins in topmost CMakLists.txt
james-d-mitchell Nov 8, 2023
1dd240b
Fix spelling
james-d-mitchell Nov 8, 2023
7cf15be
Fixed installation
hivert Nov 8, 2023
f40d0b7
Merge
hivert Nov 8, 2023
3f0342b
Fixed converage CMakeLists
hivert Nov 6, 2023
a3d06f7
Using test_all for coverage
hivert Nov 6, 2023
706556e
Remove clang-format executable accident. committed
james-d-mitchell Nov 9, 2023
05ce0fa
Rename VERSION.in -> HPCOMBI_VERSION.in again
james-d-mitchell Nov 9, 2023
3508231
Make code-coverage optional
james-d-mitchell Nov 9, 2023
a7b3bd2
Fix install again
james-d-mitchell Nov 9, 2023
0c5ea50
Try fix CI
james-d-mitchell Nov 9, 2023
84c7f29
Quick Matcher for Epu8
hivert Nov 9, 2023
e85f7cc
Add -march=native unless disabled or not available
james-d-mitchell Nov 10, 2023
229f845
Fix install dir
hivert Nov 10, 2023
c97f740
Fixup Fix install dir
hivert Nov 10, 2023
25e2142
Update README + BUILDING
james-d-mitchell Nov 15, 2023
3d31e5c
Remove return type for void function
james-d-mitchell Nov 15, 2023
2e76ebc
Add script to deploy the doc
james-d-mitchell Nov 15, 2023
cd71b47
Optimize links in README + spelling
james-d-mitchell Nov 20, 2023
4baa2f6
Add -fopenmp-simd flags if available
james-d-mitchell Nov 20, 2023
b3f3973
Pointed README to the autogened doc
hivert Dec 19, 2023
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
1 change: 0 additions & 1 deletion .VERSION

This file was deleted.

106 changes: 106 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# .circleci/config.yml

version: 2.1

jobs:
test:
parameters:
compiler:
type: string
version:
type: string
docker:
- image: reiniscirpons/hpcombi-env-arm64v8:v1
resource_class: arm.medium
steps:
- run:
name: "Set up compiler"
environment:
COMPILER_NAME: << parameters.compiler >>
COMPILER_VERSION: << parameters.version >>
command: |
apt-get --yes update
mkdir -p workspace
if [ $COMPILER_NAME = "gcc" ]; then
apt-get install --yes gcc-$COMPILER_VERSION
apt-get install --yes g++-$COMPILER_VERSION
echo "export CC=gcc-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=g++-$COMPILER_VERSION" >> workspace/new-env-vars
else
apt-get install --yes clang++-$COMPILER_VERSION
echo "export CC=clang-$COMPILER_VERSION" >> workspace/new-env-vars
echo "export CXX=clang++-$COMPILER_VERSION" >> workspace/new-env-vars
fi
- run:
name: Check compiler version
command: |
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
echo "CC"
echo $CC
echo "CXX"
echo $CXX
- checkout:
path: "./HPCombi"
- run:
name: Run cmake
command: |
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
mkdir -p ./HPCombi/build
cd ./HPCombi/build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX ..
- run:
name: Run make in tests folder
command: |
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
cd ./HPCombi/build/tests
make -j2
- run:
name: Run tests
command: |
cat workspace/new-env-vars >> $BASH_ENV
source $BASH_ENV
cd ./HPCombi/build/tests
./test_all

workflows:
test:
jobs:
- test:
name: "test-gcc-9"
compiler: "gcc"
version: "9"
# - test:
# name: "test-gcc-10"
# compiler: "gcc"
# version: "10"
# - test:
# name: "test-gcc-11"
# compiler: "gcc"
# version: "11"
- test:
name: "test-gcc-12"
compiler: "gcc"
version: "12"
- test:
name: "test-clang-11"
compiler: "clang"
version: "11"
# - test:
# name: "test-clang-12"
# compiler: "clang"
# version: "12"
# - test:
# name: "test-clang-13"
# compiler: "clang"
# version: "13"
# - test:
# name: "test-clang-14"
# compiler: "clang"
# version: "14"
- test:
name: "test-clang-15"
compiler: "clang"
version: "15"
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = ./third_party/simde,./.git,./benchmark/python,./experiments
ignore-words-list=shft
9 changes: 9 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: codespell
on: [pull_request, workflow_dispatch]

jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: codespell-project/[email protected]
75 changes: 51 additions & 24 deletions .github/workflows/runtests.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,67 @@
name: CI
on: [pull_request, push, workflow_dispatch]
on: [pull_request, workflow_dispatch]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: "ubuntu-latest | g++"
name: "ubuntu-latest"
timeout-minutes: 60
runs-on: ubuntu-latest
env:
CXX: "ccache g++"
CXXFLAGS: "-fdiagnostics-color"
CMAKE_CXX_COMPILER: "ccache g++"
strategy:
fail-fast: false
matrix:
sys:
- { compiler: 'gcc', version: '9'}
- { compiler: 'gcc', version: '10'}
- { compiler: 'gcc', version: '11'}
- { compiler: 'gcc', version: '12'}
- { compiler: 'clang', version: '11'}
- { compiler: 'clang', version: '12'}
- { compiler: 'clang', version: '13'}
- { compiler: 'clang', version: '14'}
- { compiler: 'clang', version: '15'}
steps:
- name: "Checkout HPCombi repo . . ."
uses: actions/checkout@v3
- name: "Setup ccache . . ."
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
override_cache_key: ${{ runner.os }}-${{ github.ref }}
override_cache_key_fallback: ${{ runner.os }}
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'gcc' }}
run: |
GCC_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
sudo apt-get install gcc-$GCC_VERSION
CC=gcc-$GCC_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=g++-$GCC_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Setup compiler . . ."
if: ${{ matrix.sys.compiler == 'clang' }}
run: |
LLVM_VERSION=${{ matrix.sys.version }}
sudo apt-get --yes update
sudo apt-get install --yes clang++-$LLVM_VERSION
CC=clang-$LLVM_VERSION
echo "CC=$CC" >> $GITHUB_ENV
CXX=clang++-$LLVM_VERSION
echo "CXX=$CXX" >> $GITHUB_ENV
- name: "Install dependencies . . ."
run: |
sudo apt-get --yes update
sudo apt-get install --yes ccache
sudo apt-get install --yes libbenchmark-dev
sudo apt-get install --yes libgtest-dev
sudo apt-get install --yes libboost-all-dev
- name: "Build + run HPCombi tests . . ."
sudo apt-get install --yes ccache
- name: "Configure the HPCombi build . . ."
env:
CC: ${{ env.CC }}
CXX: ${{ env.CXX }}
run: |
mkdir build
cd build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release ..
make
make test

mkdir build
cd build
cmake -DBUILD_TESTING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$CC -DCMAKE_CXX_COMPILER=$CXX ..
- name: "Build HPCombi . . ."
run: |
cd build/tests
make -j4
- name: "Run HPCombi tests . . ."
run: |
cd build/tests
./test_all
107 changes: 0 additions & 107 deletions .travis.yml

This file was deleted.

25 changes: 13 additions & 12 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
# Building HPCombi

## Build Prerequisites:
Note that HPCombi is a C++17 header-only library, and as such does not need to
be built. The instructions below are only for those who wish to either run the
tests, experiments, examples, or benchmarks.

- CMake 2.8 or later
## Build prerequisites:

- A recent c++ compiler. I have tested the code on
* g++ 5.3.1, 6.2.1 and 7.1.1.
* clang 5.0.0
* g++ 4.8 and 4.9 are known to be broken (I can fix it if needed at the price
of some uglification of the code).
- CMake 3.8 or later

- [optional] : Google sparsehash/dense_hash_map, sparsehash/dense_hash_set.
if not the less efficient standard containers will be used.
- A recent C++ compiler implementing the C++17 standard. We routinely test
HPCombi using:
* gcc 9 to 12; and
* clang 11 to 15
on both x86 and arm processors.

- BOOST.test (shared library version) : needed for testing.
- Your machine must support a small number of builtin functions such as `__builtin_popcnt`.

- Your machine must support AVX instructions.
- [optional] : Google `sparsehash/dense_hash_map` and/or `sparsehash/dense_hash_set`.

- Doxygen for generating the API documentation (in progress).
- [optional] Doxygen for generating the API documentation (in progress).

## Building

Expand Down
Loading