Skip to content

feat(ai): add stable softmax, normalization and activation kernels #139

feat(ai): add stable softmax, normalization and activation kernels

feat(ai): add stable softmax, normalization and activation kernels #139

Workflow file for this run

name: Build and Unittest
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-and-test:
name: ${{ matrix.os }} ${{ matrix.compiler }} ${{ matrix.build_type }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
compiler: msvc
build_type: Release
- os: windows-latest
compiler: msvc
build_type: Debug
- os: ubuntu-latest
compiler: gcc
build_type: Release
- os: ubuntu-latest
compiler: gcc
build_type: Debug
- os: ubuntu-latest
compiler: clang
build_type: Release
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
cmake -S . -B build -DDR3_BUILD_TESTS=ON -DDR3_BUILD_EXAMPLES=ON -DDR3_ISA=AVX2
- name: Configure (Ubuntu GCC)
if: runner.os == 'Linux' && matrix.compiler == 'gcc'
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DDR3_BUILD_TESTS=ON \
-DDR3_BUILD_EXAMPLES=ON \
-DDR3_ISA=AVX2
- name: Configure (Ubuntu Clang)
if: runner.os == 'Linux' && matrix.compiler == 'clang'
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DDR3_BUILD_TESTS=ON \
-DDR3_BUILD_EXAMPLES=ON \
-DDR3_ISA=AVX2
- name: Build
run: cmake --build build --config ${{ matrix.build_type }}
- name: Test
run: ctest --test-dir build -C ${{ matrix.build_type }} --output-on-failure --timeout 120
sanitizers:
name: ubuntu gcc Debug ASan/UBSan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure
run: |
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DDR3_BUILD_TESTS=ON \
-DDR3_BUILD_EXAMPLES=OFF \
-DDR3_ENABLE_SANITIZERS=ON \
-DDR3_ISA=AVX2
- name: Build
run: cmake --build build --config Debug
- name: Test
run: ctest --test-dir build -C Debug --output-on-failure --timeout 180
env:
ASAN_OPTIONS: detect_leaks=0:halt_on_error=1
UBSAN_OPTIONS: halt_on_error=1