-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #150 from auto-differentiation-dev/feature/perform…
…ance-improvements Performance Enhancements
- Loading branch information
Showing
32 changed files
with
1,509 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,16 @@ jobs: | |
compiler: [msvc, clang] | ||
config: [Release, Debug] | ||
standard: ["11", "17"] | ||
memory: ["default", "lowmem"] | ||
include: | ||
- config: Debug | ||
sccache: "false" | ||
cmake_extra: "" | ||
- config: Release | ||
sccache: "true" | ||
cmake_extra: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | ||
cmake_extra: -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | ||
- memory: "lowmem" | ||
cmake_mem_flag: -DXAD_REDUCED_MEMORY=ON | ||
- compiler: clang | ||
cxx: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe | ||
cc: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm/x64/bin/clang-cl.exe | ||
|
@@ -47,6 +50,12 @@ jobs: | |
toolset: "14.2" | ||
- compiler: clang | ||
toolset: "14.0" | ||
- config: Release | ||
memory: lowmem | ||
- compiler: clang | ||
memory: lowmem | ||
- compiler: clang | ||
config: Debug | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -57,7 +66,7 @@ jobs: | |
if: ${{ matrix.sccache == 'true' }} | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: windows-${{ matrix.compiler }}-${{ matrix.toolset }}-${{ matrix.config }} | ||
key: windows-${{ matrix.compiler }}-${{ matrix.toolset }}-${{ matrix.config }}-${{ matrix.memory }} | ||
variant: sccache | ||
- name: configure | ||
shell: cmd | ||
|
@@ -71,6 +80,7 @@ jobs: | |
-DCMAKE_C_COMPILER="${{ matrix.cc }}" ^ | ||
-DCMAKE_CXX_STANDARD="${{ matrix.standard }}" ^ | ||
${{ matrix.cmake_extra }} ^ | ||
${{ matrix.cmake_mem_flag }} ^ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} | ||
- name: build | ||
shell: cmd | ||
|
@@ -86,9 +96,9 @@ jobs: | |
ctest --no-compress-output --output-on-failure -j3 --output-junit test_results.xml | ||
- name: upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results (windows ${{ matrix.compiler }}-${{ matrix.toolset }}-${{ matrix.config }}) | ||
name: Test Results (windows ${{ matrix.compiler }}-${{ matrix.toolset }}-${{ matrix.config }}-${{ matrix.memory }}-${{ matrix.standard }}) | ||
path: build/test_results.xml | ||
- name: install | ||
shell: cmd | ||
|
@@ -125,6 +135,7 @@ jobs: | |
config: [Release, Debug] | ||
reuse_slots: [OFF, ON] | ||
standard: ["11", "17"] | ||
memory: ["default", "lowmem"] | ||
include: | ||
- compiler: clang-11 | ||
cxx: clang++-11 | ||
|
@@ -146,9 +157,21 @@ jobs: | |
cxx: clang++-15 | ||
cc: clang-15 | ||
os: ubuntu-22.04 | ||
- memory: lowmem | ||
cmake_mem_flag: -DXAD_REDUCED_MEMORY=ON | ||
exclude: | ||
- config: Debug | ||
reuse_slots: ON | ||
- config: Release | ||
memory: lowmem | ||
- standard: "17" | ||
memory: lowmem | ||
- compiler: clang-11 | ||
config: Debug | ||
- compiler: clang-12 | ||
config: Debug | ||
- compiler: clang-13 | ||
config: Debug | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
@@ -163,7 +186,7 @@ jobs: | |
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: linux-${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }} | ||
key: linux-${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }}-${{ matrix.memory }} | ||
- name: configure | ||
run: | | ||
mkdir build | ||
|
@@ -175,6 +198,7 @@ jobs: | |
-DCMAKE_CXX_STANDARD=${{ matrix.standard }} \ | ||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \ | ||
-DXAD_TAPE_REUSE_SLOTS=${{ matrix.reuse_slots }} \ | ||
${{ matrix.cmake_mem_flag }} \ | ||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install | ||
- name: build | ||
run: | | ||
|
@@ -186,9 +210,9 @@ jobs: | |
ctest --no-compress-output --output-on-failure --parallel $(($(nproc) + 2)) --output-junit test_results.xml | ||
- name: upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results (linux ${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }}) | ||
name: Test Results (linux ${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }}-${{ matrix.memory }}-${{ matrix.standard }}) | ||
path: build/test_results.xml | ||
- name: install | ||
run: | | ||
|
@@ -212,34 +236,42 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
compiler: | ||
- gcc5 | ||
- gcc6 | ||
- gcc7 | ||
- gcc8 | ||
- gcc9 | ||
- gcc10 | ||
- gcc11 | ||
version: ["7", "8", "9", "10", "11", "12", "13", "14"] | ||
config: [Release, Debug] | ||
reuse_slots: [OFF, ON] | ||
standard: [c++11, c++17] | ||
memory: ["default", "lowmem"] | ||
exclude: | ||
- config: Debug | ||
reuse_slots: ON | ||
- compiler: gcc5 | ||
standard: c++17 | ||
- compiler: gcc6 | ||
standard: c++17 | ||
- compiler: gcc7 | ||
- version: "7" | ||
standard: c++17 | ||
- config: Release | ||
memory: lowmem | ||
- standard: c++17 | ||
config: lowmem | ||
- version: "7" | ||
config: Debug | ||
- version: "8" | ||
config: Debug | ||
- version: "9" | ||
config: Debug | ||
- version: "10" | ||
config: Debug | ||
- version: "12" | ||
config: Debug | ||
- version: "13" | ||
config: Debug | ||
include: | ||
- memory: lowmem | ||
cmake_mem_flag: -DXAD_REDUCED_MEMORY=ON | ||
- config: Debug | ||
compiler: gcc11 | ||
version: "11" | ||
coverage: true | ||
coverage_cxx_flags: "-fprofile-arcs -ftest-coverage" | ||
coverage_ld_flags: "-lgcov" | ||
standard: c++11 | ||
- compiler: gcc11 | ||
- version: "11" | ||
config: Debug # also with reusing slots, for coverage | ||
reuse_slots: ON | ||
coverage: true | ||
|
@@ -248,48 +280,33 @@ jobs: | |
standard: c++11 | ||
runs-on: ubuntu-latest | ||
container: | ||
image: conanio/${{ matrix.compiler }} | ||
options: --user root | ||
env: | ||
ACTIONS_RUNNER_FORCED_INTERNAL_NODE_VERSION: node16 | ||
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 | ||
image: ghcr.io/foonathan/gcc:${{ matrix.version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Setup tools | ||
run: | | ||
cat /etc/lsb-release | ||
/lib/x86_64-linux-gnu/libc.so.6 | ||
sudo rm -f /etc/apt/sources.list.d/git-core-ubuntu-ppa-artful.list || true | ||
sudo rm -f /etc/apt/sources.list.d/git-core-ubuntu-ppa-xenial.list || true | ||
sudo apt-get update | ||
sudo apt-get install -y ccache ninja-build lcov | ||
apt-get update | ||
apt-get install -y ccache ninja-build lcov | ||
- name: GitHub WS Tmp | ||
# there is an issue with workspace locations in github inside containers, which this works around | ||
# see: https://github.com/actions/runner/issues/2058 | ||
run: | | ||
echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" >> $GITHUB_ENV | ||
- name: Setup cmake | ||
run: | | ||
wget https://github.com/Kitware/CMake/releases/download/v3.29.0/cmake-3.29.0-linux-x86_64.tar.gz | ||
tar -xzf cmake-3.29.0-linux-x86_64.tar.gz | ||
sudo rm /usr/bin/cmake /usr/share/cmake-* -rf | ||
echo $(pwd)/cmake-3.29.0-linux-x86_64/bin >> $GITHUB_PATH | ||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: linux-${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }} | ||
key: linux-gcc${{ matrix.version }}-${{ matrix.config }}-${{ matrix.reuse_slots }}-${{ matrix.memory }}-${{ matrix.standard }} | ||
- name: configure | ||
run: | | ||
mkdir build | ||
cd build | ||
cmake .. -GNinja \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | ||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \ | ||
-DCMAKE_CXX_FLAGS="-std=${{ matrix.standard }} ${{ matrix.coverage_cxx_flags }}" \ | ||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.coverage_ld_flags }}" \ | ||
-DXAD_TAPE_REUSE_SLOTS=${{ matrix.reuse_slots }} \ | ||
${{ matrix.cmake_mem_flag }} \ | ||
-DCMAKE_INSTALL_PREFIX=${{ env.GITHUB_WORKSPACE }}/install | ||
- name: build | ||
run: | | ||
|
@@ -307,9 +324,9 @@ jobs: | |
ctest --no-compress-output --output-on-failure --parallel $(($(nproc) + 2)) --output-junit test_results.xml | ||
- name: upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results (linux ${{ matrix.compiler }}-${{ matrix.config }}-${{ matrix.reuse_slots }}) | ||
name: Test Results (linux gcc${{ matrix.version }}-${{ matrix.config }}-${{ matrix.reuse_slots }}-${{ matrix.memory }}-${{ matrix.standard }}) | ||
path: ${{ env.GITHUB_WORKSPACE }}/build/test_results.xml | ||
- name: coverage tests | ||
if: ${{ matrix.coverage }} | ||
|
@@ -323,7 +340,7 @@ jobs: | |
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flag-name: linux-${{ matrix.compiler }}-${{ matrix.reuse_slots }} | ||
flag-name: linux-${{ matrix.compiler }}-${{ matrix.reuse_slots }}-${{ matrix.memory }} | ||
path-to-lcov: ${{env.GITHUB_WORKSPACE }}/build/coverage/lcov.info | ||
parallel: true | ||
- name: install | ||
|
@@ -340,8 +357,6 @@ jobs: | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_PREFIX_PATH="${{ env.GITHUB_WORKSPACE }}/install" \ | ||
-DCMAKE_CXX_FLAGS="-std=${{ matrix.standard}}" \ | ||
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} \ | ||
-DCMAKE_C_COMPILER=${{ matrix.cc }} \ | ||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.coverage_ld_flags }}" | ||
cmake --build . | ||
|
@@ -354,7 +369,10 @@ jobs: | |
os: [macos-13, macos-latest] | ||
compiler: [default, clang15] | ||
standard: [c++11, c++17] | ||
memory: ["default", "lowmem"] | ||
include: | ||
- memory: lowmem | ||
cmake_mem_flag: -DXAD_REDUCED_MEMORY=ON | ||
- config: Release | ||
os: macos-13 | ||
compiler: default | ||
|
@@ -382,6 +400,10 @@ jobs: | |
compiler: clang15 | ||
- os: macos-latest | ||
compiler: default | ||
- config: Release | ||
memory: lowmem | ||
- standard: "c++17" | ||
config: lowmem | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: setup | ||
|
@@ -399,7 +421,7 @@ jobs: | |
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
key: macos-${{ matrix.config }} | ||
key: macos-${{ matrix.config }}-${{ matrix.compiler }}-${{ matrix.standard }}-${{ matrix.memory }} | ||
- name: configure | ||
run: | | ||
mkdir build | ||
|
@@ -408,6 +430,7 @@ jobs: | |
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.config }} \ | ||
-DCMAKE_CXX_FLAGS="-std=${{matrix.standard }} ${{ matrix.coverage_cxx_flags }}" \ | ||
${{ matrix.cmake_mem_flag }} \ | ||
-DCMAKE_EXE_LINKER_FLAGS="${{ matrix.coverage_ld_flags }}" \ | ||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \ | ||
${{ matrix.compiler == 'clang15' && ' -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ -DCMAKE_C_COMPILER=clang' || '' }} | ||
|
@@ -427,9 +450,9 @@ jobs: | |
ctest --no-compress-output --output-on-failure -j$(sysctl -n hw.ncpu) --output-junit test_results.xml | ||
- name: upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test Results (macos ${{ matrix.config }}) | ||
name: Test Results (macos ${{ matrix.config }}-${{ matrix.compiler }}-${{ matrix.standard }}-${{ matrix.memory }}-${{ matrix.standard }}) | ||
path: build/test_results.xml | ||
- name: coverage tests | ||
if: ${{ matrix.coverage }} | ||
|
@@ -443,7 +466,7 @@ jobs: | |
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flag-name: macos | ||
flag-name: macos-${{ matrix.compiler }}-${{ matrix.standard }}-${{ matrix.memory }} | ||
path-to-lcov: build/coverage/lcov.info | ||
parallel: true | ||
- name: install | ||
|
@@ -483,7 +506,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Event File | ||
path: ${{ github.event_path }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.