core-math: bind FP16 fdim to prefixed isnan #25
This file contains hidden or 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
| --- | |
| name: Linux / CPU x86-64 tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - 'main' | |
| - 'release*' | |
| workflow_dispatch: | |
| pull_request: | |
| paths-ignore: | |
| - 'doc/**' | |
| - 'CHANGES' | |
| - 'COPYING' | |
| - 'CREDITS' | |
| - 'LICENSE' | |
| - 'README.*' | |
| - 'tools/docker/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| main_test_matrix: | |
| name: LLVM ${{ matrix.llvm }} - ${{ matrix.config }} | |
| runs-on: [self-hosted, linux, x64, "${{ matrix.config }}" ] | |
| # CPU runners have action runner directly in the home directory | |
| env: | |
| CCACHE_BASEDIR: "${{ github.workspace }}" | |
| CCACHE_DIR: "${{ github.workspace }}/../../../ccache_storage" | |
| EXAMPLES_DIR: "${{ github.workspace }}/../../../examples" | |
| TSAN_OPTIONS: "second_deadlock_stack=1" | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: [20, 22] | |
| # basic = simplest pthread build with ENABLE_CONFORMANCE | |
| # devel = with devel options without ENABLE_CONFORMANCE | |
| # TBB, OpenMP = CPU drivers with TBB/OpenMP support | |
| # cts_spirv = cts with SPIR-V | |
| # tier1 = includes CTS without SPIR-V | |
| # chipstar 1.1 only supports LLVM up to 17 | |
| # chipstar 1.2 only supports LLVM up to 19 | |
| # asan, tsan, ubsan = sanitizers | |
| # openvx = OpenVX-CTS | |
| config: [cts_spirv, tier1] | |
| include: | |
| - llvm: 19 | |
| config: chipstar | |
| - llvm: 20 | |
| config: openvx | |
| - llvm: 20 | |
| config: basic | |
| - llvm: 22 | |
| config: basic | |
| - llvm: 21 | |
| config: devel | |
| - llvm: 20 | |
| config: TBB | |
| - llvm: 21 | |
| config: OpenMP | |
| - llvm: 21 | |
| config: asan | |
| - llvm: 21 | |
| config: tsan | |
| - llvm: 21 | |
| config: ubsan | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 | |
| - name: Load Env vars | |
| id: load-env | |
| run: | | |
| cat ${{ github.workspace }}/.github/variables.txt >> $GITHUB_ENV | |
| - name: CMake | |
| id: cmake | |
| run: | | |
| export BUILD_FLAGS="-O1 -ggdb -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable" | |
| runCMake() { | |
| cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_BUILD_TYPE=RelWithDebInfo \ | |
| "-DCMAKE_C_FLAGS_RELWITHDEBINFO=${BUILD_FLAGS}" "-DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${BUILD_FLAGS}" \ | |
| -DWITH_LLVM_CONFIG=/usr/bin/llvm-config-${{ matrix.llvm }} \ | |
| "$@" -B ${{ github.workspace }}/build ${{ github.workspace }} | |
| } | |
| rm -rf ${{ github.workspace }}/build | |
| mkdir ${{ github.workspace }}/build | |
| if [ "${{ matrix.config }}" == "basic" ]; then | |
| runCMake -DENABLE_ICD=1 -DENABLE_LLVM_FILECHECKS=1 -DENABLE_CONFORMANCE=1 | |
| elif [ "${{ matrix.config }}" == "devel" ]; then | |
| runCMake -DENABLE_RELOCATION=0 -DDEVELOPER_MODE=1 -DENABLE_VALGRIND=1 -DENABLE_EXTRA_VALIDITY_CHECKS=1 -DENABLE_CONFORMANCE=0 | |
| elif [ "${{ matrix.config }}" == "OpenMP" ]; then | |
| runCMake -DENABLE_ICD=1 -DENABLE_HOST_CPU_DEVICES_OPENMP=1 | |
| elif [ "${{ matrix.config }}" == "TBB" ]; then | |
| runCMake -DENABLE_ICD=1 -DENABLE_TBB_DEVICE=1 | |
| elif [ "${{ matrix.config }}" == "cts_spirv" ]; then | |
| mkdir -p ${EXAMPLES_DIR}/build_cts_spirv | |
| mkdir -p ${EXAMPLES_DIR}/source | |
| runCMake -DENABLE_TESTSUITES=conformance -DENABLE_CONFORMANCE=ON -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_cts_spirv | |
| elif [ "${{ matrix.config }}" == "tier1" ]; then | |
| mkdir -p ${EXAMPLES_DIR}/build_tier1_llvm_${{ matrix.llvm }} | |
| # disable UnitCL for LLVM 21, it's incompatible with it | |
| if [ "${{ matrix.llvm }}" -ge "21" ]; then | |
| runCMake "-DENABLE_TESTSUITES=AMDSDK3.0;piglit;conformance;PyOpenCL;IntelSVM" -DENABLE_CONFORMANCE=ON -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_tier1_llvm_${{ matrix.llvm }} | |
| else | |
| runCMake "-DENABLE_TESTSUITES=AMDSDK3.0;piglit;conformance;PyOpenCL;IntelSVM;UnitCL" -DENABLE_CONFORMANCE=ON -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_tier1_llvm_${{ matrix.llvm }} | |
| fi | |
| elif [ "${{ matrix.config }}" == "chipstar" ]; then | |
| mkdir -p ${EXAMPLES_DIR}/build_chipstar_${{ matrix.llvm }} | |
| mkdir -p ${EXAMPLES_DIR}/source | |
| runCMake -DENABLE_TESTSUITES=chipStar -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_chipstar_${{ matrix.llvm }} | |
| elif [ "${{ matrix.config }}" == "openvx" ]; then | |
| mkdir -p ${EXAMPLES_DIR}/build_openvx | |
| mkdir -p ${EXAMPLES_DIR}/source | |
| runCMake -DENABLE_TESTSUITES=OpenVX_CTS -DTESTSUITE_SOURCE_BASEDIR=${EXAMPLES_DIR}/source -DTESTSUITE_BASEDIR=${EXAMPLES_DIR}/build_openvx | |
| elif [ "${{ matrix.config }}" == "asan" ]; then | |
| export BUILD_FLAGS="-O1 -ggdb -fno-omit-frame-pointer -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable" | |
| runCMake -DENABLE_ASAN=1 -DENABLE_ICD=0 -DENABLE_LOADABLE_DRIVERS=0 -DDEVELOPER_MODE=ON -DWITH_LLVM_CONFIG=/opt/LLVM_21_ASAN/bin/llvm-config -DENABLE_SPIRV=0 | |
| elif [ "${{ matrix.config }}" == "tsan" ]; then | |
| export BUILD_FLAGS="-O1 -ggdb -fno-omit-frame-pointer -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable" | |
| runCMake -DENABLE_TSAN=1 -DENABLE_ICD=0 -DENABLE_LOADABLE_DRIVERS=0 -DDEVELOPER_MODE=ON -DWITH_LLVM_CONFIG=/opt/LLVM_21_TSAN/bin/llvm-config -DENABLE_SPIRV=0 | |
| elif [ "${{ matrix.config }}" == "ubsan" ]; then | |
| export BUILD_FLAGS="-O1 -ggdb -fno-omit-frame-pointer -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable" | |
| runCMake -DENABLE_UBSAN=1 -DENABLE_LATEST_CXX_STD=ON -DENABLE_ICD=0 -DDEVELOPER_MODE=ON -DENABLE_LOADABLE_DRIVERS=0 -DENABLE_LLVM_FILECHECKS=0 | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi | |
| - name: Build PoCL | |
| id: build_pocl | |
| timeout-minutes: 30 | |
| run: | | |
| cd ${{ github.workspace }}/build && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) | |
| - name: Build CTS Examples | |
| id: build_cts_examples | |
| # occasionally git timeouts on git clone of the examples | |
| timeout-minutes: 60 | |
| if: ${{ matrix.config == 'cts_spirv' || matrix.config == 'tier1' }} | |
| run: | | |
| cd ${{ github.workspace }}/build/examples/conformance && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) conformance | |
| - name: Build Tier1 Examples | |
| id: build_tier1_examples | |
| timeout-minutes: 90 | |
| if: ${{ matrix.config == 'tier1' }} | |
| run: | | |
| cd ${{ github.workspace }}/build/examples/AMDSDK3.0 && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) AMDSDK3.0 | |
| cd ${{ github.workspace }}/build/examples/piglit && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) piglit | |
| # currently broken | |
| #cd ${{ github.workspace }}/build/examples/PyOpenCL && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) PyOpenCL | |
| cd ${{ github.workspace }}/build/examples/IntelSVM && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) IntelSVM | |
| if [ "${{ matrix.llvm }}" -lt "21" ]; then | |
| cd ${{ github.workspace }}/build/examples/UnitCL && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) UnitCL | |
| fi | |
| - name: Build chipStar | |
| id: build_chipstar | |
| timeout-minutes: 90 | |
| if: ${{ matrix.config == 'chipstar' }} | |
| run: | | |
| cd ${{ github.workspace }}/build/examples/chipStar && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) chipStar | |
| - name: Build OpenVX-CTS | |
| id: build_openvx_cts | |
| timeout-minutes: 90 | |
| if: ${{ matrix.config == 'openvx' }} | |
| run: | | |
| cd ${{ github.workspace }}/build/examples/OpenVX_CTS && make -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) OpenVX_CTS | |
| - name: Get CMake version | |
| id: cmake_version | |
| run: echo "version=$(cmake --version | head -n 1)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Cache CTest timings | |
| id: cache_ctest | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae | |
| with: | |
| path: ${{ github.workspace }}/build/Testing/Temporary/CTestCostData.txt | |
| key: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }}-${{ github.run_id }} | |
| restore-keys: ctest-cache-${{ steps.cmake_version.outputs.version }}-${{ runner.name }}-${{ matrix.config }} | |
| - name: Run Tests | |
| env: | |
| POCL_CACHE_DIR: "${{ runner.temp }}/GH_POCL_CACHE" | |
| CL_PLATFORM_NAME: "Portable" | |
| CL_DEVICE_TYPE: "cpu" | |
| id: ctest | |
| timeout-minutes: 120 | |
| run: | | |
| runCTest() { | |
| cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_cpu_tests -j$(${{ github.workspace }}/.github/scripts/get_cpus.sh) $CTEST_FLAGS "$@" | |
| } | |
| rm -rf ${{ env.POCL_CACHE_DIR }} | |
| # hardcoded path in test_compiler / execute_after_included_header_link | |
| rm -rf /tmp/foo | |
| mkdir ${{ env.POCL_CACHE_DIR }} | |
| if [ "${{ matrix.config }}" == "basic" ] || [ "${{ matrix.config }}" == "devel" ] || [ "${{ matrix.config }}" == "TBB" ]; then | |
| runCTest | |
| elif [ "${{ matrix.config }}" == "OpenMP" ]; then | |
| runCTest | |
| elif [ "${{ matrix.config }}" == "cts_spirv" ]; then | |
| runCTest -L conformance_suite_micro_spirv | |
| elif [ "${{ matrix.config }}" == "tier1" ]; then | |
| runCTest -L "amdsdk_30|piglit|PyOpenCL|conformance_suite_micro_main|IntelSVM|UnitCL" | |
| elif [ "${{ matrix.config }}" == "chipstar" ]; then | |
| runCTest -L chipStar | |
| elif [ "${{ matrix.config }}" == "openvx" ]; then | |
| runCTest -L openvx -j1 | |
| elif [ "${{ matrix.config }}" == "asan" ]; then | |
| # test_large_buf consumes too much memory for the smaller bots | |
| runCTest -R runtime -E test_large_buf | |
| elif [ "${{ matrix.config }}" == "tsan" ]; then | |
| # thread sanitizer does not support C11 <threads.h> | |
| # implementation of threading, only pthreads. | |
| # issue: https://github.com/google/sanitizers/issues/1603 | |
| runCTest -R runtime -E 'test_large_buf|clSetEventCallback' | |
| elif [ "${{ matrix.config }}" == "ubsan" ]; then | |
| runCTest -E test_large_buf | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi |