From ec109fb816c4dd1e04123ee2b0f64106c6238ea0 Mon Sep 17 00:00:00 2001 From: Colin Davidson Date: Tue, 22 Oct 2024 16:17:55 +0100 Subject: [PATCH] Try windows and risc-v timings --- .github/workflows/run_pr_tests.yml | 412 ++++++++++++++++----------- source/cl/test/UnitCL/CMakeLists.txt | 5 + 2 files changed, 257 insertions(+), 160 deletions(-) diff --git a/.github/workflows/run_pr_tests.yml b/.github/workflows/run_pr_tests.yml index b14e138b4f..7d95323eab 100644 --- a/.github/workflows/run_pr_tests.yml +++ b/.github/workflows/run_pr_tests.yml @@ -25,112 +25,112 @@ concurrency: jobs: # build and run host x86_64, execute UnitCL and lit tests and build and run offline - run_host_x86_64: - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - # installs tools, ninja, installs llvm and sets up sccahe - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: 18 - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - # These need to match the configurations of build_pr_cache to use the cache effectively - - name: build host x86_64 online release - uses: ./.github/actions/do_build_ock - with: - build_type: Release - - - name: run just online lit - run: - ninja -C build check-ock-all-lit - - - name: run host online check - run: - ninja -C build check-ock-UnitCL - - # use the previous build for online to get clc - - name: build host x86_64 offline release - uses: ./.github/actions/do_build_ock - with: - build_type: Release - extra_flags: -DCA_RUNTIME_COMPILER_ENABLED=OFF -DCA_EXTERNAL_CLC=${{ github.workspace }}/build/bin/clc - build_dir: build_offline - build_targets: UnitCL - assemble_spirv_ll_lit_test_offline: ON - - - name: run host x86_64 offline - run: - ninja -C build_offline check-ock-UnitCL - - # build and run riscv m1, execute UnitCL and lit tests - run_riscv_m1: - - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - # installs tools, ninja, installs llvm and sets up sccahe - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: 18 - llvm_build_type: RelAssert - save: ${{ inputs.update_cache }} - - - name: build riscv M1 - uses: ./.github/actions/do_build_ock/do_build_m1 - - - name: run riscv M1 lit - run: - ninja -C build check-ock-all-lit - - - name: run riscv M1 UnitCL tests - run: - ninja -C build check-ock-UnitCL - - # run clang-format-diff on the repo - run_clang_format: - - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: setup-ubuntu-clang-format - run: - pip install clang-format==19.1.0 - - - name: run clang-format - run: | - # we've installed clang-format-19 in the docker via pip, which just installs it as clang-format, - # so just use clang-format-diff and -b clang-format directly - git fetch origin ${{ github.base_ref }} - git diff --no-color origin/${{ github.base_ref }} | \ - clang-format-diff.py -p1 -regex \ - "^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format - - # Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline - run_windows_msvc_x86_64_llvm_latest_cl3_0_offline: - - runs-on: windows-2019 - - steps: - - name: Setup Windows llvm base - uses: llvm/actions/setup-windows@main - with: - arch: amd64 - - - name: Checkout repo - uses: actions/checkout@v4.1.0 + # run_host_x86_64: + # runs-on: ubuntu-22.04 + + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up sccahe + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 18 + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + + # # These need to match the configurations of build_pr_cache to use the cache effectively + # - name: build host x86_64 online release + # uses: ./.github/actions/do_build_ock + # with: + # build_type: Release + + # - name: run just online lit + # run: + # ninja -C build check-ock-all-lit + + # - name: run host online check + # run: + # ninja -C build check-ock-UnitCL + + # # use the previous build for online to get clc + # - name: build host x86_64 offline release + # uses: ./.github/actions/do_build_ock + # with: + # build_type: Release + # extra_flags: -DCA_RUNTIME_COMPILER_ENABLED=OFF -DCA_EXTERNAL_CLC=${{ github.workspace }}/build/bin/clc + # build_dir: build_offline + # build_targets: UnitCL + # assemble_spirv_ll_lit_test_offline: ON + + # - name: run host x86_64 offline + # run: + # ninja -C build_offline check-ock-UnitCL + + # # build and run riscv m1, execute UnitCL and lit tests + # run_riscv_m1: + + # runs-on: ubuntu-22.04 + + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # # installs tools, ninja, installs llvm and sets up sccahe + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: 18 + # llvm_build_type: RelAssert + # save: ${{ inputs.update_cache }} + + # - name: build riscv M1 + # uses: ./.github/actions/do_build_ock/do_build_m1 + + # - name: run riscv M1 lit + # run: + # ninja -C build check-ock-all-lit + + # - name: run riscv M1 UnitCL tests + # run: + # ninja -C build check-ock-UnitCL + + # # run clang-format-diff on the repo + # run_clang_format: + + # runs-on: ubuntu-22.04 + + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4 + + # - name: setup-ubuntu-clang-format + # run: + # pip install clang-format==19.1.0 + + # - name: run clang-format + # run: | + # # we've installed clang-format-19 in the docker via pip, which just installs it as clang-format, + # # so just use clang-format-diff and -b clang-format directly + # git fetch origin ${{ github.base_ref }} + # git diff --no-color origin/${{ github.base_ref }} | \ + # clang-format-diff.py -p1 -regex \ + # "^(?!(.+\\/)*(external|cookie)\\/).*\\.(c|cc|cxx|cpp|h|hh|hxx|hpp)$" -b clang-format + + # # Based on: mr-windows-msvc-x86_64-llvm-previous-cl3.0-offline + # run_windows_msvc_x86_64_llvm_latest_cl3_0_offline: + + # runs-on: windows-2019 + + # steps: + # - name: Setup Windows llvm base + # uses: llvm/actions/setup-windows@main + # with: + # arch: amd64 + + # - name: Checkout repo + # uses: actions/checkout@v4.1.0 # installs tools, ninja, installs llvm and sets up sccache - name: setup-windows @@ -143,7 +143,8 @@ jobs: - name: build ock x86_64 relassert uses: ./.github/actions/do_build_ock with: - build_targets: check-ock + build_targets: all + # check-ock enable_api: "" builtin_kernel: ON shell_to_use: pwsh @@ -151,20 +152,87 @@ jobs: debug_support: ON c_compiler: 'cl.exe' cxx_compiler: 'cl.exe' - - - name: build ock x86_64 offline - uses: ./.github/actions/do_build_ock - with: - build_targets: check-ock - runtime_compiler_enabled: OFF - external_clc: "${{ github.workspace }}/build/bin/clc.exe" - shell_to_use: pwsh - gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" - debug_support: ON - install_dir: ${{ github.workspace }}/install_offline - build_dir: ${{ github.workspace }}/build_offline - c_compiler: 'cl.exe' - cxx_compiler: 'cl.exe' + - name:TBD + run: ninja -C build check-ock-UnitCargo + - name:TBD + run: ninja -C build check-ock-UnitMD + - name:TBD + run: ninja -C build check-ock-UnitCompiler + - name:TBD + run: ninja -C build check-ock-utility command for ca-common-lit + - name:TBD + run: ninja -C build check-ock-host-compiler-lit + - name:TBD + run: ninja -C build check-ock-spirv-ll-lit + - name:TBD + run: ninja -C build check-ock-UnitMux + - name:TBD + run: ninja -C build check-ock-clVectorAddition-ComputeAorta_x86_64_Windows + - name:TBD + run: ninja -C build check-ock-clCommandBufferKHR-ComputeAorta_x86_64_Windows + - name:TBD + run: ninja -C build check-ock-clMutableDispathcKHR-ComputeAorta_x86_64_Windows + - name:TBD + run: ninja -C build check-ock-clSubGroups-ComputeAorta_x86_64_Windows + - name:TBD + run: ninja -C build check-ock-host-mux-lit + - name:TBD + run: ninja -C build check-ock-vecz-lit + - name:TBD + run: ninja -C build check-ock-passes-lit + - name:TBD + run: ninja -C build check-ock-MultiDevice + - name:TBD + run: ninja -C build check-ock-UnitCL-opt-disable + - name:TBD + run: ninja -C build check-ock-UnitCL-opt-disable-vecz + - name:TBD + run: ninja -C build check-ock-UnitCL-opt-disable-vecz-boscc + - name:TBD + run: ninja -C build check-ock-UnitCL-prevec + - name:TBD + run: ninja -C build check-ock-UnitCL-debug + - name:TBD + run: ninja -C build check-ock-UnitCL-prevec-opt-disable + - name:TBD + run: ninja -C build check-ock-UnitCL + - name:TBD + run: ninja -C build check-ock-UnitCL-prevec-vecz-full-scalarization + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-never-opt-disable-debug + - name:TBD + run: ninja -C build check-ock-UnitCL-prevec-vecz + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-boscc-debug + - name:TBD + run: ninja -C build check-ock-UnitCL-USM + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-boscc + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-debug + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-never + - name:TBD + run: ninja -C build check-ock-vkVectorAddition + - name:TBD + run: ninja -C build check-ock-UnitVK + - name:TBD + run: ninja -C build check-ock-UnitCL-vecz-everything + # - name: build ock x86_64 offline + # uses: ./.github/actions/do_build_ock + # with: + # build_targets: check-ock + # runtime_compiler_enabled: OFF + # external_clc: "${{ github.workspace }}/build/bin/clc.exe" + # shell_to_use: pwsh + # gtest_launcher: "python3;-u;${{ github.workspace }}/scripts/gtest-terse-runner.py" + # debug_support: ON + # install_dir: ${{ github.workspace }}/install_offline + # build_dir: ${{ github.workspace }}/build_offline + # c_compiler: 'cl.exe' + # cxx_compiler: 'cl.exe' # Based on: mr-ubuntu-gcc-x86_64-riscv-fp16-cl3.0-unitcl_vecz run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz: @@ -183,7 +251,8 @@ jobs: - name: build ock uses: ./.github/actions/do_build_ock with: - build_targets: check-ock-UnitCL-group-vecz + build_targets: all + # check-ock-UnitCL-group-vecz mux_targets_enable: riscv mux_compilers_enable: riscv riscv_enabled: ON @@ -194,43 +263,66 @@ jobs: hal_refsi_soc: G1 hal_refsi_thread_mode: WG debug_support: ON + + - name run check-ock-UnitCL + run: ninja -C build check-ock-UnitCL + - name run check-ock-UnitCL-vecz-never + run: ninja -C build check-ock-UnitCL-vecz-never + - name run check-ock-UnitCL-prevec-vecz + run: ninja -C check-ock-UnitCL-prevec-vecz + - name run check-ock-UnitCL-vecz-everything + run: ninja -C build check-ock-UnitCL-vecz-everything + - name run check-ock-UnitCL-vecz-never-opt-disable-debug + run: ninja -C build check-ock-UnitCL-vecz-never-opt-disable-debug + - name run check-ock-UnitCL + run: ninja -C build check-ock-UnitCL + - name run check-ock-UnitCL-vecz-boscc + run: ninja -C build check-ock-UnitCL-vecz-boscc + - name run check-ock-UnitCL-vecz-boscc-debug + run: ninja -C build check-ock-UnitCL-vecz-boscc-debug + - name run check-ock-UnitCL-vecz-debug + run: ninja -C build check-ock-UnitCL-vecz-debug + - name run check-ock-UnitCL-riscv-vecz-vf-nxv1-vp + run: ninja -C build check-ock-UnitCL-riscv-vecz-vf-nxv1-vp + - name run check-ock-UnitCL-riscv-vecz-vf-nxv1-vvp + run: ninja -C build check-ock-UnitCL-riscv-vecz-vf-nxv1-vvp # Based on: mr-ubuntu-clang-x86-llvm-previous-cl3-0-offline - run-ubuntu-clang-x86-llvm-latest-cl3-0-offline: - runs-on: ubuntu-22.04 - timeout-minutes: 90 # offline needs longer timeout - steps: - - name: Checkout repo - uses: actions/checkout@v4.1.0 - - name: setup-ubuntu - uses: ./.github/actions/setup_build - with: - llvm_version: '19' - llvm_build_type: RelAssert - arch: x86 - - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al - - name: build ock x86 relassert - uses: ./.github/actions/do_build_ock - with: - build_32_bit: ON - c_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang - cxx_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang++ - build_targets: check-ock - enable_api: "" - builtin_kernel: ON - use_linker: gold - debug_support: ON - - name: build ock x86 offline - uses: ./.github/actions/do_build_ock - with: - build_32_bit: ON - c_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang - cxx_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang++ - build_targets: check-ock - runtime_compiler_enabled: OFF - assemble_spirv_ll_lit_test_offline: ON - external_clc: ${GITHUB_WORKSPACE}/build/bin/clc - use_linker: gold - debug_support: ON - install_dir: $GITHUB_WORKSPACE/install_offline - build_dir: $GITHUB_WORKSPACE/build_offline + # run-ubuntu-clang-x86-llvm-latest-cl3-0-offline: + # runs-on: ubuntu-22.04 + # timeout-minutes: 90 # offline needs longer timeout + # steps: + # - name: Checkout repo + # uses: actions/checkout@v4.1.0 + # - name: setup-ubuntu + # uses: ./.github/actions/setup_build + # with: + # llvm_version: '19' + # llvm_build_type: RelAssert + # arch: x86 + # - run: echo WORKSPACE is $GITHUB_WORKSPACE && echo PWD is `pwd` && ls -al + # - name: build ock x86 relassert + # uses: ./.github/actions/do_build_ock + # with: + # build_32_bit: ON + # c_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang + # cxx_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang++ + # build_targets: check-ock + # enable_api: "" + # builtin_kernel: ON + # use_linker: gold + # debug_support: ON + # - name: build ock x86 offline + # uses: ./.github/actions/do_build_ock + # with: + # build_32_bit: ON + # c_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang + # cxx_compiler: $GITHUB_WORKSPACE/llvm_install/bin/clang++ + # build_targets: check-ock + # runtime_compiler_enabled: OFF + # assemble_spirv_ll_lit_test_offline: ON + # external_clc: ${GITHUB_WORKSPACE}/build/bin/clc + # use_linker: gold + # debug_support: ON + # install_dir: $GITHUB_WORKSPACE/install_offline + # build_dir: $GITHUB_WORKSPACE/build_offline diff --git a/source/cl/test/UnitCL/CMakeLists.txt b/source/cl/test/UnitCL/CMakeLists.txt index 9020cb39cb..eec477f76e 100644 --- a/source/cl/test/UnitCL/CMakeLists.txt +++ b/source/cl/test/UnitCL/CMakeLists.txt @@ -14,6 +14,11 @@ # # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +option(CA_CL_ENABLE_RVV_SCALABLE_VECZ_CHECK "Enable RVV scalable vecz checking" OFF) +option(CA_CL_ENABLE_RVV_SCALABLE_VP_VECZ_CHECK "Enable RVV scalable VP vecz checking" OFF) +option(CA_CL_ENABLE_VECZ_FULL_CHECK "Enable vecz full checking" ON) + + if(CA_CL_ENABLE_OFFLINE_KERNEL_TESTS AND NOT CA_RUNTIME_COMPILER_ENABLED AND NOT CA_EXTERNAL_CLC) message(FATAL_ERROR "CA_CL_ENABLE_OFFLINE_KERNEL_TESTS is set, but "