Revert "enable FP16 regardless of ENABLE_HOST_CPU_VECTORIZE_BUILTINS"
#3
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: Mac OS X / CPU 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 | |
| env: | |
| POCL_CACHE_DIR: "/tmp/GH_POCL_CACHE" | |
| CTEST_FLAGS: "--output-on-failure --test-output-size-failed 128000 --test-output-size-passed 128000" | |
| POCL_KERNEL_CACHE: "0" | |
| POCL_MAX_WORK_GROUP_SIZE: "2048" | |
| POCL_MEMORY_LIMIT: "2" | |
| jobs: | |
| main_test_matrix: | |
| name: LLVM macOS ${{ matrix.llvm }} - ${{ matrix.config }} | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| llvm: [18, 19] | |
| # basic = simplest pthread build | |
| # devel = with devel options | |
| # cts_spirv = cts with SPIR-V | |
| # tier1 = includes CTS without SPIR-V | |
| # asan, tsan, ubsan = sanitizers | |
| config: [basic, devel] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 | |
| - uses: conda-incubator/setup-miniconda@835234971496cad1653abb28a638a281cf32541f | |
| with: | |
| miniforge-version: latest | |
| mamba-version: "*" | |
| activate-environment: pocl-deps | |
| - name: Install dependencies | |
| shell: bash -el {0} | |
| run: | | |
| mamba install 'clangdev=${{ matrix.llvm }}.*' 'llvmdev=${{ matrix.llvm }}.*' \ | |
| 'llvm-spirv=${{ matrix.llvm }}.*' libhwloc ld64 pkg-config cmake make libxml2-devel | |
| conda activate pocl-deps | |
| if [ "${{ matrix.config }}" == "basic" ]; then | |
| mamba install khronos-opencl-icd-loader clhpp | |
| fi | |
| - name: CMake | |
| shell: bash -el {0} | |
| id: cmake | |
| run: | | |
| runCMake() { | |
| BUILD_FLAGS="-O1 -march=native -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable" | |
| cmake -DDEVELOPER_MODE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_PREFIX_PATH=$CONDA_PREFIX \ | |
| -DOPENCL_H=$CONDA_PREFIX/include/CL/opencl.h -DOPENCL_HPP=$CONDA_PREFIX/include/CL/opencl.hpp \ | |
| -DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=$BUILD_FLAGS" "-DCMAKE_CXX_FLAGS_RELEASE=$BUILD_FLAGS" \ | |
| -DWITH_LLVM_CONFIG=$CONDA_PREFIX/bin/llvm-config -DLLVM_SPIRV=$CONDA_PREFIX/bin/llvm-spirv \ | |
| "$@" -B ${{ github.workspace }}/build ${{ github.workspace }} | |
| } | |
| rm -rf ${{ github.workspace }}/build | |
| mkdir ${{ github.workspace }}/build | |
| if [ "${{ matrix.config }}" == "basic" ]; then | |
| runCMake -DENABLE_ICD=0 | |
| elif [ "${{ matrix.config }}" == "devel" ]; then | |
| runCMake -DENABLE_ICD=0 -DENABLE_EXTRA_VALIDITY_CHECKS=1 -DENABLE_RELOCATION=0 | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi | |
| - name: Build PoCL | |
| shell: bash -el {0} | |
| id: build_pocl | |
| timeout-minutes: 20 | |
| run: | | |
| cd ${{ github.workspace }}/build && make -j$(sysctl -n hw.logicalcpu) | |
| - name: Build Examples | |
| shell: bash -el {0} | |
| id: build_examples | |
| timeout-minutes: 120 | |
| if: ${{ matrix.config == 'cts_spirv' || matrix.config == 'tier1' || matrix.config == 'chipStar' }} | |
| run: | | |
| cd ${{ github.workspace }}/build && make -j$(sysctl -n hw.logicalcpu) prepare_examples | |
| - name: Run Tests | |
| shell: bash -el {0} | |
| id: ctest | |
| run: | | |
| runCTest() { | |
| cd ${{ github.workspace }}/build && ${{ github.workspace }}/tools/scripts/run_cpu_tests -j$(sysctl -n hw.logicalcpu) $CTEST_FLAGS "$@" | |
| } | |
| rm -rf ${{ env.POCL_CACHE_DIR }} | |
| mkdir ${{ env.POCL_CACHE_DIR }} | |
| if [ "${{ matrix.config }}" == "basic" ]; then | |
| runCTest | |
| elif [ "${{ matrix.config }}" == "devel" ]; 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" | |
| elif [ "${{ matrix.config }}" == "chipStar" ]; then | |
| runCTest -L chipStar | |
| else | |
| echo "Unknown configuration" && exit 1 | |
| fi |