Skip to content

Commit

Permalink
Update to latest develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Oct 16, 2021
2 parents 0c720df + bac1330 commit 4bc912b
Show file tree
Hide file tree
Showing 1,274 changed files with 8,950 additions and 7,799 deletions.
102 changes: 2 additions & 100 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,51 +57,6 @@ commands:
##==================================================================================================
## Jobs setup
##==================================================================================================
base_jobs: &base_jobs
docker:
- image: jfalcou/compilers:latest
parameters:
tool:
type: string
options:
type: string
default: ""
setup:
type: string
default: ""
steps:
- checkout
- configure_toolchain:
tool: << parameters.tool >>
options: << parameters.options >>
setup: << parameters.setup >>
- compile:
targets: "../cmake/toolchain/arch.targets.json"
cpu: 2
- ctest:
targets: "../cmake/toolchain/arch.targets.json"
- run:
name: Pre-compiling large swizzle functions
command: cd build && ninja unit.api.regular.swizzle.exe -k 0 -j 1
- compile:
targets: "../cmake/toolchain/api.targets.json"
cpu: 2
- ctest:
targets: "../cmake/toolchain/api.targets.json"
- compile:
targets: "../cmake/toolchain/doc.targets.json"
cpu: 2
- ctest:
targets: "../cmake/toolchain/doc.targets.json"
- run:
name: Pre-compiling large math function
command: cd build && ninja unit.real.math.heavy.exe -k 0 -j 2
- compile:
targets: "../cmake/toolchain/real.targets.json"
cpu: 2
- ctest:
targets: "../cmake/toolchain/real.targets.json"

random_jobs: &random_jobs
docker:
- image: jfalcou/compilers:latest
Expand All @@ -126,44 +81,16 @@ random_jobs: &random_jobs
- ctest:
targets: "../cmake/toolchain/random.targets.json"

bench_jobs: &bench_jobs
docker:
- image: jfalcou/compilers:latest
parameters:
tool:
type: string
options:
type: string
default: ""
setup:
type: string
default: ""
steps:
- checkout
- configure_toolchain:
tool: << parameters.tool >>
options: << parameters.options >>
setup: << parameters.setup >>
- compile:
targets: "../cmake/toolchain/benchmarks.targets.json"
cpu: 2

##==================================================================================================
## Jobs list
##==================================================================================================
jobs:
x86_gcc_avx512:
<<: *base_jobs
x86_clang_avx512:
<<: *base_jobs
random_sse2:
<<: *random_jobs
random_avx2:
<<: *random_jobs
random_arm:
<<: *random_jobs
bench_avx2:
<<: *bench_jobs

##==================================================================================================
## Workflow & dependencies
Expand All @@ -173,32 +100,17 @@ workflows:
build_and_test:
jobs:
##==============================================================================================
## X86 - 512 bits
##==============================================================================================
- x86_gcc_avx512:
tool: "../cmake/toolchain/gcc.x86.cmake"
options: "-march=skylake-avx512"
filters:
branches:
ignore: develop
- x86_clang_avx512:
tool: "../cmake/toolchain/clang.x86.cmake"
options: "-march=skylake-avx512"
filters:
branches:
ignore: develop
##==============================================================================================
## Random tests
##==============================================================================================
- random_sse2:
tool: "../cmake/toolchain/gcc.x86.cmake"
tool: "../cmake/toolchain/gcc.x86.ci.cmake"
options: "-msse2"
setup: "-DEVE_BUILD_RANDOM=ON"
filters:
branches:
ignore: develop
- random_avx2:
tool: "../cmake/toolchain/gcc.x86.cmake"
tool: "../cmake/toolchain/gcc.x86.ci.cmake"
options: "-mavx2"
setup: "-DEVE_BUILD_RANDOM=ON"
filters:
Expand All @@ -211,13 +123,3 @@ workflows:
filters:
branches:
ignore: develop
##==============================================================================================
## Benchmarks compilations
##==============================================================================================
# - bench_avx2:
# tool: "../cmake/toolchain/gcc.x86.opt.cmake"
# options: "-mavx2"
# setup: "-DEVE_BUILD_BENCHMARKS=ON"
# filters:
# branches:
# ignore: develop
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions .github/actions/run_tests/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# action.yml
name: 'Clone and Build Tests'
description: 'Clone and build a given repository'
inputs:
options: # compiler options
description: 'Compiler options'
required: false
default: ''
cmake-options: # CMake options
description: 'CMake options'
required: false
default: ''
status: # How much of the test we shoudl run
description: 'Completion Status'
required: false
default: '1'
runs:
using: "composite"
steps:
- run: .github/actions/run_tests/run.sh ${{ inputs.options }} ${{ inputs.cmake-options }} ${{ inputs.status }}
shell: bash
111 changes: 111 additions & 0 deletions .github/actions/run_tests/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/bin/sh -l

compile_target()
{
echo "::group::Compiling $1" ;
ninja -v $1 -j 16;
compile=$?;
echo "::endgroup::" ;

return $compile;
}

compile_targets()
{
for i in `../cmake/toolchain/filter.sh $1 keys`;
do
compile_target $i;
if [ "$?" -ne "0" ]
then
echo "::error $i can not be compiled!" ;
return 1;
fi
done;

return 0;
}

test_target()
{
echo "::group::Running $1 tests" ;
ctest --output-on-failure -R $1 -j 16;
tested=$?;
echo "::endgroup::" ;

return $tested;
}

test_targets()
{
for i in `../cmake/toolchain/filter.sh $1 values`;
do
test_target $i;
if [ "$?" -ne "0" ]
then
echo "::error $i tests failed!" ;
return 1;
fi
done;

return 0;
}

echo "::group::Running: 'cmake .. -G Ninja -DCMAKE_CXX_FLAGS="$1" $2'"
mkdir build
cd build
cmake .. -G Ninja -DEVE_OPTIONS="$1" $2
echo "::endgroup::"

compile_targets ../cmake/toolchain/arch.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

test_targets ../cmake/toolchain/arch.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

compile_targets ../cmake/toolchain/api.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

test_targets ../cmake/toolchain/api.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

if [ "$3" -eq "1" ]
then

compile_targets ../cmake/toolchain/doc.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

test_targets ../cmake/toolchain/doc.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

compile_targets ../cmake/toolchain/real.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi

test_targets ../cmake/toolchain/real.targets.json
if [ "$?" -eq "1" ]
then
exit 1;
fi
fi

exit 0
12 changes: 9 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@ on:
branches:
- develop

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

jobs:
arch-x86:
runs-on: ubuntu-latest
runs-on: self-hosted
strategy:
fail-fast: false
matrix:
Expand All @@ -20,12 +24,14 @@ jobs:
- { comp: clang, arch: x86 , opts: -mavx , status: 1 }
- { comp: clang, arch: x86 , opts: -mavx2 , status: 1 }
- { comp: clang, arch: x86 , opts: -DEVE_NO_SIMD , status: 1 }
- { comp: clang, arch: x86_sde, opts: -march=skylake-avx512 , status: 1 }
- { comp: gcc , arch: x86 , opts: -msse2 , status: 1 }
- { comp: gcc , arch: x86 , opts: -mssse3 , status: 1 }
- { comp: gcc , arch: x86 , opts: -msse4.2 , status: 1 }
- { comp: gcc , arch: x86 , opts: -mavx , status: 1 }
- { comp: gcc , arch: x86 , opts: -mavx2 , status: 1 }
- { comp: gcc , arch: x86 , opts: -DEVE_NO_SIMD , status: 1 }
- { comp: gcc , arch: x86_sde, opts: -march=skylake-avx512 , status: 1 }

steps:
- name: Fetch current branch
Expand All @@ -50,7 +56,7 @@ jobs:
- name: Fetch current branch
uses: actions/checkout@v2
- name: Testing EVE with ${{ matrix.cfg.comp }} on ${{ matrix.cfg.arch }} with ${{ matrix.cfg.opts }}
uses: ./.github/actions/run_tests
uses: ./.github/actions/run_docker
with:
options: '${{ matrix.cfg.opts }}'
cmake-options: '-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/${{ matrix.cfg.comp }}.${{ matrix.cfg.arch }}.cmake'
Expand All @@ -68,7 +74,7 @@ jobs:
- name: Fetch current branch
uses: actions/checkout@v2
- name: Testing EVE with ${{ matrix.cfg.comp }} on ${{ matrix.cfg.arch }} with ${{ matrix.cfg.opts }}
uses: ./.github/actions/run_tests
uses: ./.github/actions/run_docker
with:
options: '${{ matrix.cfg.opts }}'
cmake-options: '-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/${{ matrix.cfg.comp }}.${{ matrix.cfg.arch }}.cmake'
Expand Down
26 changes: 0 additions & 26 deletions benchmarks/module/math/cos/big/cos.hpp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@
*/
//==================================================================================================
#include <eve/function/cos.hpp>
#include <eve/constant/pio_4.hpp>
#include <eve/constant/pi.hpp>

int main()
{
auto lmax = eve::pio_4(eve::as<EVE_VALUE>());
auto lmax = eve::pi(eve::as<EVE_VALUE>());
auto lmin = -lmax;

auto arg0 = eve::bench::random_<EVE_VALUE>(lmin, lmax);
auto std__cos = [](auto x){return std::cos(x);};

eve::bench::experiment xp;
run<EVE_VALUE>(EVE_NAME(scalar std::cos) , xp, std__cos , arg0);
run<EVE_VALUE>(EVE_NAME(restricted(cos)) , xp, eve::restricted(eve::cos), arg0);
run<EVE_TYPE >(EVE_NAME(restricted(cos)) , xp, eve::restricted(eve::cos), arg0);
run<EVE_VALUE>(EVE_NAME(full_circle(cos)) , xp, eve::full_circle(eve::cos), arg0);
run<EVE_TYPE >(EVE_NAME(full_circle(cos)) , xp, eve::full_circle(eve::cos), arg0);
run<EVE_VALUE>(EVE_NAME(eve::cos) , xp, eve::cos , arg0);
run<EVE_TYPE >(EVE_NAME(eve::cos) , xp, eve::cos , arg0);
}
Loading

0 comments on commit 4bc912b

Please sign in to comment.