From 7488093e6b55f1fb6204f4e7c2fe327c9aaca1b2 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 12 Dec 2024 16:16:21 +0000 Subject: [PATCH 01/78] Tweak initial settings --- .github/workflows/planned_testing.yml | 1 - .github/workflows/planned_testing_caller.yml | 8 +++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 7edbefe7d..c0eafa4e6 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -122,7 +122,6 @@ jobs: with: target: ${{ matrix.target }} - # Currently only builds and runs (default: quick) on x86_64 linux build_run_opencl_cts: if: inputs.test_opencl_cts needs: [ workflow_vars, build_icd, create_ock_artefacts ] diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 5e6c24b71..b1a3da607 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -19,10 +19,12 @@ jobs: if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule' uses: ./.github/workflows/planned_testing.yml with: - target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + # TODO: restore settings + #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux" ]' ock: true - test_tornado: true - test_sycl_cts: true + test_sycl_cts: false + test_tornado: false test_opencl_cts: true # Have a pull request setting which can be used to test the flow as best as possible # in a reasonable time From e173a6e8f79b8b3411a94e0466efbb0597293e88 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 13 Dec 2024 13:54:17 +0000 Subject: [PATCH 02/78] Add basic structure for aarch64 --- .../actions/do_build_opencl_cts/action.yml | 32 ++++++++++++++++++- .github/actions/run_opencl_cts/action.yml | 25 ++++++++++++++- .github/workflows/planned_testing.yml | 2 +- 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index bae51173d..a82cf72bb 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -35,7 +35,37 @@ runs: repository: KhronosGroup/OpenCL-CTS path: OpenCL-CTS - - name: build opencl cts + - name: build opencl cts x86_64 + if: ARCH == x86_64 + shell: bash + env: + # TODO: host-x86_64-linux 'toolchain' - expand for other targets + CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ + -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + run: | + # get spirv-as + sudo apt-get update + sudo apt-get install -y spirv-tools + # apply patches + pushd OpenCL-CTS + git log -1 + git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0001-Patch-sub-group-testing.patch + git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0002-Permit-building-for-unknown-architectures.patch + popd + # do build + set -x + cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ + -DCMAKE_BUILD_TYPE=Release \ + -DOPENCL_LIBRARIES=OpenCL \ + -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ + -DCL_LIB_DIR=$GITHUB_WORKSPACE/install_icd/lib + ninja -v + python3 $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/assemble_spirv.py -v \ + --source-dir $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/spirv_asm \ + --output-dir $GITHUB_WORKSPACE/test_conformance/spirv_bin + + - name: build opencl cts aarch64 + if: ARCH == aarch64 shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 975a67586..ebf04bd9b 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -19,7 +19,30 @@ runs: name: ock_${{inputs.target}} path: install_ock - - name: Run opencl cts + - name: Run opencl cts x86_64 + if: ARCH == x86_64 + shell: bash + env: + CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv + # TODO: host-x86_64-linux filter - expand for other targets + CTS_FILTER: cts-3.0-online-ignore-linux-host.csv + CTS_TIMEOUT: 18:00:00 # OK for github? + run: | + cd "$GITHUB_WORKSPACE/OpenCL-CTS" + echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" + set -x + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout $CTS_TIMEOUT \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + + - name: Run opencl cts aarch64 + if: ARCH == aarch64 shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index c0eafa4e6..517240762 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -128,7 +128,7 @@ jobs: strategy: matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} # TODO: host-x86_64-linux only - expand for other targets runs-on: ubuntu-22.04 From 0833367d3169f02ee0d1c7adb622fba1410e54eb Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 13 Dec 2024 14:14:38 +0000 Subject: [PATCH 03/78] Fix arch vars setting --- .github/actions/do_build_opencl_cts/action.yml | 4 ++-- .github/actions/run_opencl_cts/action.yml | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index a82cf72bb..5cea39bde 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -36,7 +36,7 @@ runs: path: OpenCL-CTS - name: build opencl cts x86_64 - if: ARCH == x86_64 + if: steps.calc_vars.outputs.arch == x86_64 shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets @@ -65,7 +65,7 @@ runs: --output-dir $GITHUB_WORKSPACE/test_conformance/spirv_bin - name: build opencl cts aarch64 - if: ARCH == aarch64 + if: steps.calc_vars.outputs.arch == aarch64 shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index ebf04bd9b..a041913f2 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -13,6 +13,12 @@ inputs: runs: using: "composite" steps: + - name: calc vars + id: calc_vars + uses: ./.github/actions/calc_vars + with: + target: ${{ inputs.target }} + - name: Download ock artefact uses: actions/download-artifact@v4 with: @@ -20,7 +26,7 @@ runs: path: install_ock - name: Run opencl cts x86_64 - if: ARCH == x86_64 + if: steps.calc_vars.outputs.arch == x86_64 shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv @@ -42,7 +48,7 @@ runs: -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - name: Run opencl cts aarch64 - if: ARCH == aarch64 + if: steps.calc_vars.outputs.arch == aarch64 shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv From f5c4d46bafa4f0973ef3a504a27a1593795dea24 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 13 Dec 2024 14:29:09 +0000 Subject: [PATCH 04/78] Fix quotes for arch --- .github/actions/do_build_opencl_cts/action.yml | 4 ++-- .github/actions/run_opencl_cts/action.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 5cea39bde..fc84a623f 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -36,7 +36,7 @@ runs: path: OpenCL-CTS - name: build opencl cts x86_64 - if: steps.calc_vars.outputs.arch == x86_64 + if: steps.calc_vars.outputs.arch == 'x86_64' shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets @@ -65,7 +65,7 @@ runs: --output-dir $GITHUB_WORKSPACE/test_conformance/spirv_bin - name: build opencl cts aarch64 - if: steps.calc_vars.outputs.arch == aarch64 + if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index a041913f2..b57e242c2 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -26,7 +26,7 @@ runs: path: install_ock - name: Run opencl cts x86_64 - if: steps.calc_vars.outputs.arch == x86_64 + if: steps.calc_vars.outputs.arch == 'x86_64' shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv @@ -48,7 +48,7 @@ runs: -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - name: Run opencl cts aarch64 - if: steps.calc_vars.outputs.arch == aarch64 + if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv From 85edde87e6dc46f03c4cc4803fbb1a29db8163f5 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 13 Dec 2024 15:10:13 +0000 Subject: [PATCH 05/78] add 'fail_fast: false' to opencl-cts --- .github/workflows/planned_testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 517240762..e6f2e0ce0 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -126,6 +126,7 @@ jobs: if: inputs.test_opencl_cts needs: [ workflow_vars, build_icd, create_ock_artefacts ] strategy: + fail-fast: false matrix: target: ${{ fromJson(inputs.target_list) }} exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} From 401d0c48f4603e6cd2cd7ecfd96324b8e06d3943 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 10:30:30 +0000 Subject: [PATCH 06/78] Allow PRs for planned testing - for now --- .github/workflows/planned_testing_caller.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index b1a3da607..5fc46b8ca 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - #pull_request: - # paths: - # - '.github/workflows/planned_testing.yml' - # - '.github/workflows/planned_testing_caller.yml' - # branches: - # - main + pull_request: + paths: + - '.github/workflows/planned_testing.yml' + - '.github/workflows/planned_testing_caller.yml' + branches: + - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' From e6624568f51b77e765ddef22a8c075e76afb6e11 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 12:11:08 +0000 Subject: [PATCH 07/78] add toolchain files --- .github/actions/do_build_opencl_cts/action.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index fc84a623f..d179703fa 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -40,8 +40,9 @@ runs: shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets - CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ - -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ + # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + CMAKE_TOOLCHAIN: "--toolchain $GITHUB_WORKSPACE/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | # get spirv-as sudo apt-get update @@ -69,8 +70,9 @@ runs: shell: bash env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets - CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ - -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ + # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" + CMAKE_TOOLCHAIN: "--toolchain $GITHUB_WORKSPACE/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | # get spirv-as sudo apt-get update From cf444579c9506e4e1a342ca1d7ae1c81b799ea6e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 12:13:48 +0000 Subject: [PATCH 08/78] add toolchain files #2 --- .github/toolchains/aarch64-linux.cmake | 29 ++++++++++++++++++++++++++ .github/toolchains/x86_64-linux.cmake | 6 ++++++ 2 files changed, 35 insertions(+) create mode 100644 .github/toolchains/aarch64-linux.cmake create mode 100644 .github/toolchains/x86_64-linux.cmake diff --git a/.github/toolchains/aarch64-linux.cmake b/.github/toolchains/aarch64-linux.cmake new file mode 100644 index 000000000..042e5b783 --- /dev/null +++ b/.github/toolchains/aarch64-linux.cmake @@ -0,0 +1,29 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(TRIPLE "aarch64-linux-gnu") +find_program(CMAKE_C_COMPILER NAMES + ${TRIPLE}-gcc + ${TRIPLE}-gcc-14 ${TRIPLE}-gcc-13 ${TRIPLE}-gcc-12 + ${TRIPLE}-gcc-11 ${TRIPLE}-gcc-10 ${TRIPLE}-gcc-9 + ${TRIPLE}-gcc-8 ${TRIPLE}-gcc-7) +find_program(CMAKE_CXX_COMPILER NAMES + ${TRIPLE}-g++ + ${TRIPLE}-g++-14 ${TRIPLE}-g++-13 ${TRIPLE}-g++-12 + ${TRIPLE}-g++-11 ${TRIPLE}-g++-10 ${TRIPLE}-g++-9 + ${TRIPLE}-g++-8 ${TRIPLE}-g++-7) +set(PKG_CONFIG_EXECUTABLE ${TRIPLE}-pkg-config) + +set(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +# vc-intrinsics, used as part of the DPC++ build, uses find_file to find +# the absolute path of a file that it already knows the absolute path of +# in order to get a useful error message if it is not found, but the way +# it does this does not account for find_file's cross compilation +# support. +#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +set(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64;-L;/usr/aarch64-linux-gnu) + diff --git a/.github/toolchains/x86_64-linux.cmake b/.github/toolchains/x86_64-linux.cmake new file mode 100644 index 000000000..248efc034 --- /dev/null +++ b/.github/toolchains/x86_64-linux.cmake @@ -0,0 +1,6 @@ +set(CMAKE_C_COMPILER gcc) +set(CMAKE_C_FLAGS -m64) +set(CMAKE_CXX_COMPILER g++) +set(CMAKE_CXX_FLAGS -m64) +set(PKG_CONFIG_EXECUTABLE pkg-config) + From f991c95454b9fc2a20d1b059dd041d9d10597053 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 12:31:50 +0000 Subject: [PATCH 09/78] Fix github workspace var --- .github/actions/do_build_opencl_cts/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index d179703fa..8c211b6ff 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -42,7 +42,7 @@ runs: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - CMAKE_TOOLCHAIN: "--toolchain $GITHUB_WORKSPACE/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | # get spirv-as sudo apt-get update @@ -72,7 +72,7 @@ runs: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - CMAKE_TOOLCHAIN: "--toolchain $GITHUB_WORKSPACE/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | # get spirv-as sudo apt-get update From cec99b14e580ab7d2e7ab4b2d0f237717faa5e83 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 13:31:31 +0000 Subject: [PATCH 10/78] add aarch64 x-compilers and qemu --- .github/actions/do_build_opencl_cts/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 8c211b6ff..bec2faeb8 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -74,6 +74,8 @@ runs: # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | + sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + sudo apt-get install --yes qemu-user # get spirv-as sudo apt-get update sudo apt-get install -y spirv-tools From 7986308e2aab067b5ae78a3d6537db2ce247da5d Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 15:22:53 +0000 Subject: [PATCH 11/78] refactor toolchain and add logging --- .github/actions/do_build_opencl_cts/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index bec2faeb8..eb75ac18a 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -42,8 +42,9 @@ runs: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | + ls -laR # get spirv-as sudo apt-get update sudo apt-get install -y spirv-tools @@ -72,8 +73,9 @@ runs: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | + ls -laR sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get install --yes qemu-user # get spirv-as From 481f8bfd27e4017f71ea843c24b97298b7ea4416 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 15:38:29 +0000 Subject: [PATCH 12/78] Add x-compiler install for ICD --- .github/actions/do_build_icd/action.yml | 4 ++++ .github/actions/do_build_opencl_cts/action.yml | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index eb2bf08be..5bf35b4e4 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -51,6 +51,10 @@ runs: - name: icd cmake shell: bash run: + if [ "$ARCH" = "aarch64" ] ; then + sudo apt-get update + sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + fi cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index eb75ac18a..bcc642e11 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -38,7 +38,7 @@ runs: - name: build opencl cts x86_64 if: steps.calc_vars.outputs.arch == 'x86_64' shell: bash - env: + #env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" @@ -69,17 +69,18 @@ runs: - name: build opencl cts aarch64 if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash - env: + #env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | ls -laR + sudo apt-get update + # x-compile prereqs sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get install --yes qemu-user # get spirv-as - sudo apt-get update sudo apt-get install -y spirv-tools # apply patches pushd OpenCL-CTS From 041e05a6ca4314c269ffbd68cc44badd13607021 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 15:52:20 +0000 Subject: [PATCH 13/78] Update ICD cmake for x-compile --- .github/actions/do_build_icd/action.yml | 30 ++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index 5bf35b4e4..a412184ff 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -25,10 +25,14 @@ runs: - name: cmake headers shell: bash - run: - cmake headers -Bheaders/build_${{steps.calc_vars.outputs.arch}} - -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} - -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} + run: | + if [ "$ARCH" = "aarch64" ] ; then \ + sudo apt-get update ; \ + sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ + fi + cmake headers -Bheaders/build_${{steps.calc_vars.outputs.arch}} \ + -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ + -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} \ -GNinja - name: ninja install headers shell: bash @@ -50,17 +54,13 @@ runs: - name: icd cmake shell: bash - run: - if [ "$ARCH" = "aarch64" ] ; then - sudo apt-get update - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu - fi - cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} - -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} - -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} - -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install_icd_${{steps.calc_vars.outputs.arch}} - -DOpenCLHeaders_DIR=$GITHUB_WORKSPACE/headers_install_${{steps.calc_vars.outputs.arch}}/share/cmake/OpenCLHeaders - -GNinja + run: | + cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} \ + -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ + -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ + -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install_icd_${{steps.calc_vars.outputs.arch}} \ + -DOpenCLHeaders_DIR=$GITHUB_WORKSPACE/headers_install_${{steps.calc_vars.outputs.arch}}/share/cmake/OpenCLHeaders \ + -GNinja - name: icd build shell: bash From 9080a7dd9fe1b4b3897ca2fdb6ff030dea70e062 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 16:10:46 +0000 Subject: [PATCH 14/78] Use pre-set vars --- .github/actions/do_build_icd/action.yml | 3 ++- .github/actions/do_build_opencl_cts/action.yml | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index a412184ff..44d4e1d2a 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -26,7 +26,8 @@ runs: - name: cmake headers shell: bash run: | - if [ "$ARCH" = "aarch64" ] ; then \ + echo ARCH is: $arch + if [ "$arch" = "aarch64" ] ; then \ sudo apt-get update ; \ sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ fi diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index bcc642e11..f1a1ec6cc 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -44,6 +44,8 @@ runs: # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | + echo ARCH is: $arch + echo CMAKE_TOOLCHAIN is: $cmake_toolchain ls -laR # get spirv-as sudo apt-get update @@ -56,7 +58,7 @@ runs: popd # do build set -x - cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ + cmake -G Ninja $cmake_toolchain $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ @@ -75,6 +77,8 @@ runs: # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" run: | + echo ARCH is: $arch + echo CMAKE_TOOLCHAIN is: $cmake_toolchain ls -laR sudo apt-get update # x-compile prereqs @@ -90,7 +94,7 @@ runs: popd # do build set -x - cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ + cmake -G Ninja $cmake_toolchain $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ From 3b373aa9d6ec9ddc364393e22efa05a99d93223e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 16:25:18 +0000 Subject: [PATCH 15/78] Update preset vars usage --- .github/actions/do_build_icd/action.yml | 4 +++- .github/actions/do_build_opencl_cts/action.yml | 14 +++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index 44d4e1d2a..f1fdabf67 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -27,7 +27,9 @@ runs: shell: bash run: | echo ARCH is: $arch - if [ "$arch" = "aarch64" ] ; then \ + echo ARCH is: $ARCH + echo ARCH is: ${{ steps.calc_vars.outputs.arch }} + if [ "${{ steps.calc_vars.outputs.arch }}" = "aarch64" ] ; then \ sudo apt-get update ; \ sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ fi diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index f1a1ec6cc..7a02df580 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -38,14 +38,14 @@ runs: - name: build opencl cts x86_64 if: steps.calc_vars.outputs.arch == 'x86_64' shell: bash - #env: + env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.toolchain }}" run: | - echo ARCH is: $arch - echo CMAKE_TOOLCHAIN is: $cmake_toolchain + echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR # get spirv-as sudo apt-get update @@ -58,7 +58,7 @@ runs: popd # do build set -x - cmake -G Ninja $cmake_toolchain $GITHUB_WORKSPACE/OpenCL-CTS \ + cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ @@ -76,9 +76,9 @@ runs: #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" + CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.toolchain }}" run: | - echo ARCH is: $arch - echo CMAKE_TOOLCHAIN is: $cmake_toolchain + echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR sudo apt-get update # x-compile prereqs @@ -94,7 +94,7 @@ runs: popd # do build set -x - cmake -G Ninja $cmake_toolchain $GITHUB_WORKSPACE/OpenCL-CTS \ + cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ From bf5c33ba1c87af4113fb00e4c88f9d2baff35a7b Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 16:37:14 +0000 Subject: [PATCH 16/78] Fix missing env: --- .github/actions/do_build_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 7a02df580..17b104f58 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -71,7 +71,7 @@ runs: - name: build opencl cts aarch64 if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash - #env: + env: # TODO: host-x86_64-linux 'toolchain' - expand for other targets #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" From 871fac2fd357bcbe7a14466ad128937bd6fbaa3a Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 17:10:31 +0000 Subject: [PATCH 17/78] Add --toolset (needs proper fix) --- .github/actions/do_build_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 17b104f58..f3dd301bc 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -76,7 +76,7 @@ runs: #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" - CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.toolchain }}" + CMAKE_TOOLCHAIN: "--toolchain ${{ steps.calc_vars.outputs.toolchain }}" run: | echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR From af325d9e7225cb4c9beedc295c23ced3a53c3336 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 16 Dec 2024 17:27:44 +0000 Subject: [PATCH 18/78] Checkout platform for toolchain files --- .github/actions/do_build_icd/action.yml | 5 +++-- .github/workflows/planned_testing.yml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index f1fdabf67..c6f33c0d4 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -26,9 +26,8 @@ runs: - name: cmake headers shell: bash run: | - echo ARCH is: $arch - echo ARCH is: $ARCH echo ARCH is: ${{ steps.calc_vars.outputs.arch }} + set -x if [ "${{ steps.calc_vars.outputs.arch }}" = "aarch64" ] ; then \ sudo apt-get update ; \ sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ @@ -37,6 +36,7 @@ runs: -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} \ -GNinja + - name: ninja install headers shell: bash run: @@ -58,6 +58,7 @@ runs: - name: icd cmake shell: bash run: | + set -x cmake icd -B icd/build_${{steps.calc_vars.outputs.arch}} \ -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \ diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index e6f2e0ce0..d468b1414 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -139,9 +139,11 @@ jobs: with: # scripts: for run_cities.py # source: for CTS filter.csv files + # platform: for toolchain files sparse-checkout: | scripts source + platform .github # TODO: Consider separating out opencl_cts build and run in the future - name : build and upload opencl_cts From c15c696915b5d48c7456282b472e272f0d2412fb Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 09:59:22 +0000 Subject: [PATCH 19/78] add arch for arm64 --- .github/actions/do_build_opencl_cts/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index f3dd301bc..bf9af7198 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -80,6 +80,7 @@ runs: run: | echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR + sudo dpkg --add-architecture arm64 sudo apt-get update # x-compile prereqs sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu From 5fae1f053e35f17c881c7bfc54c0b84a70ab7c76 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 10:31:08 +0000 Subject: [PATCH 20/78] Update sources.list for aarch64 --- .github/actions/do_build_opencl_cts/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index bf9af7198..ede410683 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -80,9 +80,10 @@ runs: run: | echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR + # add x-compile support for aarch64 sudo dpkg --add-architecture arm64 + sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo apt-get update - # x-compile prereqs sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get install --yes qemu-user # get spirv-as From 73bcb1641facaf8f2237db700418a3318bae7625 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 11:19:53 +0000 Subject: [PATCH 21/78] Explicitly install ld-linux-aarch64.so.1 --- .github/actions/do_build_opencl_cts/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index ede410683..50f76f8ec 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -85,6 +85,8 @@ runs: sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo apt-get update sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + sudo apt install libc6:arm64 + ls -l /lib sudo apt-get install --yes qemu-user # get spirv-as sudo apt-get install -y spirv-tools From 1e82b6793c73bd0b8caa107a394b79086a04a978 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 13:24:46 +0000 Subject: [PATCH 22/78] remove libc6 install --- .github/actions/do_build_opencl_cts/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 50f76f8ec..306da2d14 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -81,11 +81,11 @@ runs: echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR # add x-compile support for aarch64 - sudo dpkg --add-architecture arm64 sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list - sudo apt-get update + sudo dpkg --add-architecture arm64 sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu - sudo apt install libc6:arm64 + sudo apt-get update + #sudo apt install libc6:arm64 ls -l /lib sudo apt-get install --yes qemu-user # get spirv-as From b933162f7954cba6db904c518ba5ca02b6043a1d Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 14:16:33 +0000 Subject: [PATCH 23/78] consolidate targets --- .github/actions/do_build_icd/action.yml | 14 +++-- .../actions/do_build_opencl_cts/action.yml | 53 ++++--------------- .github/actions/run_opencl_cts/action.yml | 31 +---------- .github/workflows/planned_testing.yml | 2 +- 4 files changed, 21 insertions(+), 79 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index c6f33c0d4..945816b77 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -17,6 +17,15 @@ runs: - name: Install Ninja uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch + - name: aarch64 set-up + if: steps.calc_vars.outputs.arch == "aarch64" + shell: bash + run: | + echo ARCH is: ${{ steps.calc_vars.outputs.arch }} + set -x + sudo apt-get update + sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + - name: clone headers uses: actions/checkout@v4 with: @@ -26,12 +35,7 @@ runs: - name: cmake headers shell: bash run: | - echo ARCH is: ${{ steps.calc_vars.outputs.arch }} set -x - if [ "${{ steps.calc_vars.outputs.arch }}" = "aarch64" ] ; then \ - sudo apt-get update ; \ - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ - fi cmake headers -Bheaders/build_${{steps.calc_vars.outputs.arch}} \ -DCMAKE_TOOLCHAIN_FILE=${{ steps.calc_vars.outputs.toolchain }} \ -DCMAKE_INSTALL_PREFIX=$PWD/headers_install_${{steps.calc_vars.outputs.arch}} \ diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 306da2d14..07b6abe44 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -35,60 +35,27 @@ runs: repository: KhronosGroup/OpenCL-CTS path: OpenCL-CTS - - name: build opencl cts x86_64 - if: steps.calc_vars.outputs.arch == 'x86_64' - shell: bash - env: - # TODO: host-x86_64-linux 'toolchain' - expand for other targets - #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ - # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" - CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.toolchain }}" - run: | - echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} - ls -laR - # get spirv-as - sudo apt-get update - sudo apt-get install -y spirv-tools - # apply patches - pushd OpenCL-CTS - git log -1 - git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0001-Patch-sub-group-testing.patch - git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0002-Permit-building-for-unknown-architectures.patch - popd - # do build - set -x - cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ - -DCMAKE_BUILD_TYPE=Release \ - -DOPENCL_LIBRARIES=OpenCL \ - -DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \ - -DCL_LIB_DIR=$GITHUB_WORKSPACE/install_icd/lib - ninja -v - python3 $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/assemble_spirv.py -v \ - --source-dir $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/spirv_asm \ - --output-dir $GITHUB_WORKSPACE/test_conformance/spirv_bin - - - name: build opencl cts aarch64 + - name: aarch64 set-up if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash env: - # TODO: host-x86_64-linux 'toolchain' - expand for other targets - #CMAKE_TOOLCHAIN: "-DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-m64 -DCMAKE_CXX_COMPILER=g++ \ - # -DCMAKE_CXX_FLAGS=-m64 -DPKG_CONFIG_EXECUTABLE=pkg-config" - #CMAKE_TOOLCHAIN: "--toolchain ${{ github.workspace }}/.github/toolchains/${{ steps.calc_vars.outputs.arch }}-linux.cmake" - CMAKE_TOOLCHAIN: "--toolchain ${{ steps.calc_vars.outputs.toolchain }}" run: | - echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.toolchain }} ls -laR - # add x-compile support for aarch64 + set -x sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo dpkg --add-architecture arm64 sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get update - #sudo apt install libc6:arm64 - ls -l /lib sudo apt-get install --yes qemu-user + + - name: build opencl cts + shell: bash + env: + CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.cmake_toolchain }}" + run: | + echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.cmake_toolchain }} # get spirv-as + sudo apt-get update sudo apt-get install -y spirv-tools # apply patches pushd OpenCL-CTS diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index b57e242c2..975a67586 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -13,42 +13,13 @@ inputs: runs: using: "composite" steps: - - name: calc vars - id: calc_vars - uses: ./.github/actions/calc_vars - with: - target: ${{ inputs.target }} - - name: Download ock artefact uses: actions/download-artifact@v4 with: name: ock_${{inputs.target}} path: install_ock - - name: Run opencl cts x86_64 - if: steps.calc_vars.outputs.arch == 'x86_64' - shell: bash - env: - CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv - # TODO: host-x86_64-linux filter - expand for other targets - CTS_FILTER: cts-3.0-online-ignore-linux-host.csv - CTS_TIMEOUT: 18:00:00 # OK for github? - run: | - cd "$GITHUB_WORKSPACE/OpenCL-CTS" - echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" - set -x - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ - --color=always --timeout $CTS_TIMEOUT \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - - - name: Run opencl cts aarch64 - if: steps.calc_vars.outputs.arch == 'aarch64' + - name: Run opencl cts shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index d468b1414..057614d0f 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -126,7 +126,7 @@ jobs: if: inputs.test_opencl_cts needs: [ workflow_vars, build_icd, create_ock_artefacts ] strategy: - fail-fast: false + fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} From e2158ece84a2756a12686a667edab3f2aa2a06ea Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 14:20:21 +0000 Subject: [PATCH 24/78] fix quotes --- .github/actions/do_build_icd/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index 945816b77..d2a14ad30 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -18,7 +18,7 @@ runs: uses: llvm/actions/install-ninja@a1ea791b03c8e61f53a0e66f2f73db283aa0f01e # main branch - name: aarch64 set-up - if: steps.calc_vars.outputs.arch == "aarch64" + if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash run: | echo ARCH is: ${{ steps.calc_vars.outputs.arch }} From 51cd2ded15dbba6c389ed527e5ef92fc8aa8f777 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 14:34:56 +0000 Subject: [PATCH 25/78] Fix extra "env:" --- .github/actions/do_build_opencl_cts/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 07b6abe44..dd3110f47 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -38,7 +38,6 @@ runs: - name: aarch64 set-up if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash - env: run: | ls -laR set -x From c006ec940c09b42ea03f89f8cbebe5ada07f52b3 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 15:09:24 +0000 Subject: [PATCH 26/78] ard-wire new toolchain --- .github/actions/do_build_opencl_cts/action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index dd3110f47..31d18f74b 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -52,7 +52,9 @@ runs: env: CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.cmake_toolchain }}" run: | - echo CMAKE_TOOLCHAIN is: ${{ steps.calc_vars.outputs.cmake_toolchain }} + echo OLD CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN + CMAKE_TOOLCHAIN="$GITHUB_WORKSPACE/.github/toolchains/aarch64-linux.cmake" + echo NEW CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN # get spirv-as sudo apt-get update sudo apt-get install -y spirv-tools From c92a4d94cfeeabf0a468e61efda76ec4210e44d6 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 15:35:33 +0000 Subject: [PATCH 27/78] Restore toolchain file and add find --- .github/actions/do_build_opencl_cts/action.yml | 4 +--- .github/actions/run_opencl_cts/action.yml | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 31d18f74b..1c8469bbc 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -52,9 +52,7 @@ runs: env: CMAKE_TOOLCHAIN: "${{ steps.calc_vars.outputs.cmake_toolchain }}" run: | - echo OLD CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN - CMAKE_TOOLCHAIN="$GITHUB_WORKSPACE/.github/toolchains/aarch64-linux.cmake" - echo NEW CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN + echo CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN # get spirv-as sudo apt-get update sudo apt-get install -y spirv-tools diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 975a67586..90fcc6ddb 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -27,6 +27,8 @@ runs: CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | + echo FINDING: + sudo find / -name ld-linux-aarch64.so.1 cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x From 4ecf5fbe2515621adfba55e1029257cb46111006 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 16:26:17 +0000 Subject: [PATCH 28/78] which qemu --- .github/actions/do_build_opencl_cts/action.yml | 1 + .github/actions/run_opencl_cts/action.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 1c8469bbc..3e6366bb5 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -46,6 +46,7 @@ runs: sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get update sudo apt-get install --yes qemu-user + echo WHICH && which qemu-aarch64 - name: build opencl cts shell: bash diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 90fcc6ddb..51d7fdb5b 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -28,7 +28,7 @@ runs: CTS_TIMEOUT: 18:00:00 # OK for github? run: | echo FINDING: - sudo find / -name ld-linux-aarch64.so.1 + sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x From 761c1cd0409f8c1ac3a65761f39db0b43f7f5e74 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 16:46:50 +0000 Subject: [PATCH 29/78] more logging --- .github/actions/do_build_opencl_cts/action.yml | 5 ++++- .github/actions/run_opencl_cts/action.yml | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 3e6366bb5..b88d56832 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -46,7 +46,7 @@ runs: sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu sudo apt-get update sudo apt-get install --yes qemu-user - echo WHICH && which qemu-aarch64 + echo WHICH1 && which qemu-aarch64 - name: build opencl cts shell: bash @@ -65,6 +65,9 @@ runs: popd # do build set -x + echo WHICH2 && which qemu-aarch64 + echo CAT && cat ${{ steps.calc_vars.outputs.toolchain }} + echo FIND1 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 51d7fdb5b..a35c4e9f0 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -27,8 +27,7 @@ runs: CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | - echo FINDING: - sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND + echo FIND2 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x From a2ffdfe9e7b8fcf3b03da24eb04348957ed3fbc8 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 17:13:22 +0000 Subject: [PATCH 30/78] more logging --- .github/actions/do_build_opencl_cts/action.yml | 2 +- .github/actions/run_opencl_cts/action.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index b88d56832..c51816618 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -66,7 +66,7 @@ runs: # do build set -x echo WHICH2 && which qemu-aarch64 - echo CAT && cat ${{ steps.calc_vars.outputs.toolchain }} + echo CAT1 && cat ${{ steps.calc_vars.outputs.toolchain }} echo FIND1 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index a35c4e9f0..ac0c8147e 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -27,10 +27,11 @@ runs: CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | - echo FIND2 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x + echo WHICH3 && which qemu-aarch64 + echo FIND2 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ -b "$GITHUB_WORKSPACE/test_conformance" \ From 6b3754eca32ba4afbb678e3eecdb55039757cf17 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 17 Dec 2024 17:45:27 +0000 Subject: [PATCH 31/78] Add lib paths --- .github/actions/run_opencl_cts/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index ac0c8147e..d96ebe0f7 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -36,6 +36,8 @@ runs: --color=always --timeout $CTS_TIMEOUT \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -L "/usr/aarch64-linux-gnu/lib/" \ + -L "/usr/aarch64-linux-gnu/" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ -e "CL_PLATFORM_INDEX=0" \ From b5d7d76ffa92e636ac54d575be2387b6a5a93c9b Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 10:53:52 +0000 Subject: [PATCH 32/78] add cmake messages --- platform/arm-linux/aarch64-toolchain.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platform/arm-linux/aarch64-toolchain.cmake b/platform/arm-linux/aarch64-toolchain.cmake index 6bb2d39de..c9e479d58 100644 --- a/platform/arm-linux/aarch64-toolchain.cmake +++ b/platform/arm-linux/aarch64-toolchain.cmake @@ -117,4 +117,7 @@ if(NOT QEMU_AARCH64_EXECUTABLE MATCHES NOTFOUND) set(CMAKE_CROSSCOMPILING_EMULATOR ${QEMU_AARCH64_EXECUTABLE} -L ${CMAKE_FIND_ROOT_PATH} CACHE STRING "qemu" FORCE) + message(HERE CMAKE_CROSSCOMPILING_EMULATOR="${CMAKE_CROSSCOMPILING_EMULATOR}") +else() + message(HERE QEMU_AARCH64_EXECUTABLE MATCHES NOTFOUND) endif() From df9ddf1faf47224a7030fb1bb5c198a2259c5c59 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 14:39:30 +0000 Subject: [PATCH 33/78] Unsuffixed compiler versions --- .github/actions/do_build_icd/action.yml | 2 +- .github/actions/do_build_opencl_cts/action.yml | 2 +- .github/actions/setup_build/action.yml | 4 ++-- .github/workflows/create_llvm.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index d2a14ad30..058ef66c7 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -24,7 +24,7 @@ runs: echo ARCH is: ${{ steps.calc_vars.outputs.arch }} set -x sudo apt-get update - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - name: clone headers uses: actions/checkout@v4 diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index c51816618..8234c1a98 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -43,7 +43,7 @@ runs: set -x sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo dpkg --add-architecture arm64 - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu sudo apt-get update sudo apt-get install --yes qemu-user echo WHICH1 && which qemu-aarch64 diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index aa78e4f7b..a976006de 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -58,10 +58,10 @@ runs: sudo apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32tinfo-dev; \ fi if [ "${{ inputs.cross_arch }}" = "arm" ]; then \ - sudo apt-get install --yes gcc-11-arm-linux-gnueabihf g++-11-arm-linux-gnueabihf; \ + sudo apt-get install --yes gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf; \ fi if [ "${{ inputs.cross_arch }}" = "aarch64" ]; then \ - sudo apt-get install --yes gcc-11-aarch64-linux-gnu g++-11-aarch64-linux-gnu; \ + sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu; \ fi if [ "${{ inputs.cross_arch }}" = "riscv64" ]; then \ sudo apt-get install --yes gcc-11-riscv64-linux-gnu g++-11-riscv64-linux-gnu; \ diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index db5cf4a1f..d12662b94 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -104,7 +104,7 @@ jobs: - name: install aarch64 build tools if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'aarch64' }} run: - sudo apt-get install --yes g++-11-aarch64-linux-gnu + sudo apt-get install --yes g++-aarch64-linux-gnu - name: install x86 build tools if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'x86' }} From b1874d657e10912a65fef2b88d8f65bc0989b2a6 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 15:08:30 +0000 Subject: [PATCH 34/78] remove logging and toolchain files --- .../actions/do_build_opencl_cts/action.yml | 6 +--- .github/actions/run_opencl_cts/action.yml | 4 --- .github/toolchains/aarch64-linux.cmake | 29 ------------------- .github/toolchains/x86_64-linux.cmake | 6 ---- 4 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 .github/toolchains/aarch64-linux.cmake delete mode 100644 .github/toolchains/x86_64-linux.cmake diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 8234c1a98..8dc34082b 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -39,14 +39,13 @@ runs: if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash run: | - ls -laR + #ls -laR set -x sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo dpkg --add-architecture arm64 sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu sudo apt-get update sudo apt-get install --yes qemu-user - echo WHICH1 && which qemu-aarch64 - name: build opencl cts shell: bash @@ -65,9 +64,6 @@ runs: popd # do build set -x - echo WHICH2 && which qemu-aarch64 - echo CAT1 && cat ${{ steps.calc_vars.outputs.toolchain }} - echo FIND1 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \ -DCMAKE_BUILD_TYPE=Release \ -DOPENCL_LIBRARIES=OpenCL \ diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index d96ebe0f7..975a67586 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -30,14 +30,10 @@ runs: cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x - echo WHICH3 && which qemu-aarch64 - echo FIND2 && sudo find / -name ld-linux-aarch64.so.1 || echo NOT FOUND python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -L "/usr/aarch64-linux-gnu/lib/" \ - -L "/usr/aarch64-linux-gnu/" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ -e "CL_PLATFORM_INDEX=0" \ diff --git a/.github/toolchains/aarch64-linux.cmake b/.github/toolchains/aarch64-linux.cmake deleted file mode 100644 index 042e5b783..000000000 --- a/.github/toolchains/aarch64-linux.cmake +++ /dev/null @@ -1,29 +0,0 @@ -set(CMAKE_SYSTEM_NAME Linux) -set(CMAKE_SYSTEM_PROCESSOR aarch64) - -set(TRIPLE "aarch64-linux-gnu") -find_program(CMAKE_C_COMPILER NAMES - ${TRIPLE}-gcc - ${TRIPLE}-gcc-14 ${TRIPLE}-gcc-13 ${TRIPLE}-gcc-12 - ${TRIPLE}-gcc-11 ${TRIPLE}-gcc-10 ${TRIPLE}-gcc-9 - ${TRIPLE}-gcc-8 ${TRIPLE}-gcc-7) -find_program(CMAKE_CXX_COMPILER NAMES - ${TRIPLE}-g++ - ${TRIPLE}-g++-14 ${TRIPLE}-g++-13 ${TRIPLE}-g++-12 - ${TRIPLE}-g++-11 ${TRIPLE}-g++-10 ${TRIPLE}-g++-9 - ${TRIPLE}-g++-8 ${TRIPLE}-g++-7) -set(PKG_CONFIG_EXECUTABLE ${TRIPLE}-pkg-config) - -set(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE}) -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -# vc-intrinsics, used as part of the DPC++ build, uses find_file to find -# the absolute path of a file that it already knows the absolute path of -# in order to get a useful error message if it is not found, but the way -# it does this does not account for find_file's cross compilation -# support. -#set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - -set(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64;-L;/usr/aarch64-linux-gnu) - diff --git a/.github/toolchains/x86_64-linux.cmake b/.github/toolchains/x86_64-linux.cmake deleted file mode 100644 index 248efc034..000000000 --- a/.github/toolchains/x86_64-linux.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(CMAKE_C_COMPILER gcc) -set(CMAKE_C_FLAGS -m64) -set(CMAKE_CXX_COMPILER g++) -set(CMAKE_CXX_FLAGS -m64) -set(PKG_CONFIG_EXECUTABLE pkg-config) - From 89f5fb6b3729ed51e05aee83af9472d6b6053ae4 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 16:23:54 +0000 Subject: [PATCH 35/78] Add CTS_PROFILE and suppress PR tests --- .github/actions/run_opencl_cts/action.yml | 5 ++++ .github/workflows/codeql.yml | 28 +++++++++++------------ .github/workflows/create_llvm.yml | 6 ++--- .github/workflows/run_pr_tests_caller.yml | 26 ++++++++++----------- 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 975a67586..3cde75ae4 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -27,11 +27,16 @@ runs: CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | + CTS_PROFILE="" + if [ "${{inputs.target}}" = "aarch64" ] ; then \ + CTS_PROFILE="-p qemu --qemu 'qemu-aarch64 -L /usr/aarch64-linux-gnu'"; \ + fi cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ + $CTS_PROFILE \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 969248aa1..b8aedbaf7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,20 +4,20 @@ on: push: branches: - main - pull_request: - branches: - - main - paths: - - 'source/**' - - 'clik/**' - - 'modules/**' - - 'examples/**' - - 'cmake/**' - - 'hal/**' - - '.github/actions/do_build_ock/**' - - '.github/actions/setup_build/**' - - '.github/workflows/codeql.yml' - - 'CMakeLists.txt' + #pull_request: + # branches: + # - main + # paths: + # - 'source/**' + # - 'clik/**' + # - 'modules/**' + # - 'examples/**' + # - 'cmake/**' + # - 'hal/**' + # - '.github/actions/do_build_ock/**' + # - '.github/actions/setup_build/**' + # - '.github/workflows/codeql.yml' + # - 'CMakeLists.txt' schedule: - cron: '19 9 * * 3' diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index d12662b94..f3da41d1d 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -6,9 +6,9 @@ on: - main paths: - '.github/workflows/create_llvm.yml' - pull_request: - paths: - - '.github/workflows/create_llvm.yml' + #pull_request: + # paths: + # - '.github/workflows/create_llvm.yml' schedule: # Run Mon-Fri at 5pm - cron: '00 17 * * 1-5' diff --git a/.github/workflows/run_pr_tests_caller.yml b/.github/workflows/run_pr_tests_caller.yml index 3df7768d1..06bea0e07 100644 --- a/.github/workflows/run_pr_tests_caller.yml +++ b/.github/workflows/run_pr_tests_caller.yml @@ -1,19 +1,19 @@ # Calling workflow for running PR style tests name: Run ock tests for PR style testing on: - pull_request: - paths: - - 'source/**' - - 'clik/**' - - 'modules/**' - - 'examples/**' - - 'cmake/**' - - 'hal/**' - - '.github/actions/do_build_ock/**' - - '.github/actions/setup_build/**' - - '.github/workflows/run_pr_tests.yml' - - '.github/workflows/run_pr_tests_caller.yml' - - 'CMakeLists.txt' + #pull_request: + # paths: + # - 'source/**' + # - 'clik/**' + # - 'modules/**' + # - 'examples/**' + # - 'cmake/**' + # - 'hal/**' + # - '.github/actions/do_build_ock/**' + # - '.github/actions/setup_build/**' + # - '.github/workflows/run_pr_tests.yml' + # - '.github/workflows/run_pr_tests_caller.yml' + # - 'CMakeLists.txt' schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' From cc42a6ea6039250131fb28722fa572951e31cc32 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 16:42:03 +0000 Subject: [PATCH 36/78] Fix target spec for run --- .github/actions/run_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 3cde75ae4..274fccb38 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -28,7 +28,7 @@ runs: CTS_TIMEOUT: 18:00:00 # OK for github? run: | CTS_PROFILE="" - if [ "${{inputs.target}}" = "aarch64" ] ; then \ + if [ "${{inputs.target}}" = "host_aarch64_linux" ] ; then \ CTS_PROFILE="-p qemu --qemu 'qemu-aarch64 -L /usr/aarch64-linux-gnu'"; \ fi cd "$GITHUB_WORKSPACE/OpenCL-CTS" From 1c30563f61161016def9d5cf660ee759fad05bab Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 17:02:18 +0000 Subject: [PATCH 37/78] add pull path for qemu-aarch64 --- .github/actions/run_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 274fccb38..b8a2f2904 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -29,7 +29,7 @@ runs: run: | CTS_PROFILE="" if [ "${{inputs.target}}" = "host_aarch64_linux" ] ; then \ - CTS_PROFILE="-p qemu --qemu 'qemu-aarch64 -L /usr/aarch64-linux-gnu'"; \ + CTS_PROFILE="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"; \ fi cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" From 8622cab4ea145c31b2d6b69f02d19d0e63a86340 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 18 Dec 2024 17:35:03 +0000 Subject: [PATCH 38/78] Fix quoting --- .github/actions/run_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index b8a2f2904..eb0d55865 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -29,7 +29,7 @@ runs: run: | CTS_PROFILE="" if [ "${{inputs.target}}" = "host_aarch64_linux" ] ; then \ - CTS_PROFILE="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"; \ + CTS_PROFILE='-p qemu --qemu '"'/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"''; \ fi cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" From afeaa944e4eda50ee5842d5c3dd36b3085653680 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 09:42:22 +0000 Subject: [PATCH 39/78] add logging --- .github/actions/run_opencl_cts/action.yml | 1 + .github/workflows/planned_testing.yml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index eb0d55865..097b0a1b3 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -31,6 +31,7 @@ runs: if [ "${{inputs.target}}" = "host_aarch64_linux" ] ; then \ CTS_PROFILE='-p qemu --qemu '"'/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"''; \ fi + echo CTS_PROFILE IS $CTS_PROFILE cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 057614d0f..946b0e088 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -40,6 +40,8 @@ jobs: outputs: matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} + env: + CTS_PROFILE: '-p qemu --qemu "/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu"' steps: - id: vars # TODO: If we expand on this, come up with a more programmatical way of doing only certain targets. @@ -49,6 +51,20 @@ jobs: echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT + - id: alan + run: | + echo CTS_PROFILE IS $CTS_PROFILE + set -x + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout CTS_TIMEOUT \ + $CTS_PROFILE \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/CTS_FILTER" create_ock_artefacts: From 171dd7761c0cfa71ad68a8085b375ec2722d1f9d Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 09:49:26 +0000 Subject: [PATCH 40/78] try escapes --- .github/workflows/planned_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 946b0e088..36b55eae4 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -41,7 +41,7 @@ jobs: matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} env: - CTS_PROFILE: '-p qemu --qemu "/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu"' + CTS_PROFILE: '-p qemu --qemu \"/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu\"' steps: - id: vars # TODO: If we expand on this, come up with a more programmatical way of doing only certain targets. From 2733968889397f4a02d8ed4b409ca4b8d72fa4e5 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 09:54:08 +0000 Subject: [PATCH 41/78] moree quotes --- .github/workflows/planned_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 36b55eae4..33232cf26 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -41,7 +41,7 @@ jobs: matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} env: - CTS_PROFILE: '-p qemu --qemu \"/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu\"' + CTS_PROFILE: '-p qemu --qemu ''/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu''' steps: - id: vars # TODO: If we expand on this, come up with a more programmatical way of doing only certain targets. From 92aaa18b36f455174e2f59b3511c059537c83e51 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 09:56:49 +0000 Subject: [PATCH 42/78] quotes --- .github/workflows/planned_testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 33232cf26..5731f2454 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -41,7 +41,7 @@ jobs: matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} env: - CTS_PROFILE: '-p qemu --qemu ''/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu''' + CTS_PROFILE: -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' steps: - id: vars # TODO: If we expand on this, come up with a more programmatical way of doing only certain targets. From 3fcca6649c6c4c6eba18aaeaeaf0204eaa6ef795 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 09:59:06 +0000 Subject: [PATCH 43/78] mo quo --- .github/workflows/planned_testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 5731f2454..40d2ee9e3 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -57,6 +57,7 @@ jobs: set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout CTS_TIMEOUT \ + -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ $CTS_PROFILE \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ From 0ba2c668913d3c0ef16a3edbd4ab319b232a46fd Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 19 Dec 2024 10:04:46 +0000 Subject: [PATCH 44/78] hard-wire qemu --- .github/actions/run_opencl_cts/action.yml | 7 +------ .github/workflows/planned_testing.yml | 18 ------------------ 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 097b0a1b3..d0763a31e 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -27,17 +27,12 @@ runs: CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | - CTS_PROFILE="" - if [ "${{inputs.target}}" = "host_aarch64_linux" ] ; then \ - CTS_PROFILE='-p qemu --qemu '"'/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"''; \ - fi - echo CTS_PROFILE IS $CTS_PROFILE cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ - $CTS_PROFILE \ + -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 40d2ee9e3..cdfb932d7 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -40,8 +40,6 @@ jobs: outputs: matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} - env: - CTS_PROFILE: -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' steps: - id: vars # TODO: If we expand on this, come up with a more programmatical way of doing only certain targets. @@ -51,22 +49,6 @@ jobs: echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT - - id: alan - run: | - echo CTS_PROFILE IS $CTS_PROFILE - set -x - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ - --color=always --timeout CTS_TIMEOUT \ - -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ - $CTS_PROFILE \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/CTS_FILTER" - create_ock_artefacts: needs: [workflow_vars] From eda65d05f4e94b526766e3595a653fe818e46d2e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 6 Jan 2025 13:50:31 +0000 Subject: [PATCH 45/78] Initial riscv and qemu shell refactor --- .github/actions/run_opencl_cts/action.yml | 10 +++++++++- .github/actions/setup_build/action.yml | 2 +- .github/workflows/planned_testing.yml | 5 ++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index d0763a31e..cad0b780e 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -29,10 +29,18 @@ runs: run: | cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" + export QEMU_SETTING="" + if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then + echo MATCH $TARGET + QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" + elif [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then + echo MATCH $TARGET + QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu'" + fi set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ - -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ + $QEMU_SETTING \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index a976006de..f19628efb 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -64,7 +64,7 @@ runs: sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu; \ fi if [ "${{ inputs.cross_arch }}" = "riscv64" ]; then \ - sudo apt-get install --yes gcc-11-riscv64-linux-gnu g++-11-riscv64-linux-gnu; \ + sudo apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu; \ fi if [ "${{ inputs.cross_arch }}" != "none" ] && [ "${{ inputs.cross_arch }}" != "x86" ]; then \ # Install QEMU for testing cross compilation. diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index cdfb932d7..53e507cdb 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -38,6 +38,7 @@ jobs: workflow_vars: runs-on: ubuntu-22.04 outputs: + matrix_only_linux_x86_64_aarch64_riscv64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64 }} matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} steps: @@ -46,6 +47,7 @@ jobs: # These variables are for excluding certain targets from the total list, which is why just including # two targets is a long list of excludes run: | + echo matrix_only_linux_x86_64_aarch64_riscv64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT @@ -128,7 +130,8 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} # TODO: host-x86_64-linux only - expand for other targets runs-on: ubuntu-22.04 From f8d0c8c20e856e7e37ef022b8f62d8b4cc8c36ae Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 6 Jan 2025 16:41:01 +0000 Subject: [PATCH 46/78] Add echo for qemu --- .github/actions/run_opencl_cts/action.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index cad0b780e..abcf79faa 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -31,12 +31,22 @@ runs: echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then - echo MATCH $TARGET + echo MATCH ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" elif [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then - echo MATCH $TARGET + echo MATCH ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu'" fi + echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout $CTS_TIMEOUT \ + $QEMU_SETTING \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ From f493fcfb53d447f1f26b982ff311812f9e6cb1f4 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 7 Jan 2025 10:53:27 +0000 Subject: [PATCH 47/78] Add initial support for RiscV to planned_testing --- .github/workflows/planned_testing.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 53e507cdb..c1bec9e7a 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -57,7 +57,8 @@ jobs: strategy: matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} # risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we # build llvm. Otherwise we choose windows or ubuntu-22.04 depending on the @@ -79,7 +80,8 @@ jobs: strategy: matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} runs-on: ubuntu-22.04 steps: From 3caf689fd6779450fce7d127cf9ae77331baaae9 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 7 Jan 2025 14:21:16 +0000 Subject: [PATCH 48/78] Fix riscv64 toolchain file; add fail-fast:false as reqd. --- .github/actions/calc_vars/action.yml | 2 +- .github/workflows/planned_testing.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/actions/calc_vars/action.yml b/.github/actions/calc_vars/action.yml index f3cb4a79b..a6f6bf134 100644 --- a/.github/actions/calc_vars/action.yml +++ b/.github/actions/calc_vars/action.yml @@ -34,7 +34,7 @@ runs: CMAKE_TOOLCHAIN="--toolchain $TOOLCHAIN" elif [[ "${{inputs.target}}" = "host_riscv64_linux" ]]; then ARCH=riscv64 >> $GITHUB_OUTPUT - TOOLCHAIN=$GITHUB_WORKSPACE/platform/riscv64-linux/riscv64-toolchain.cmake + TOOLCHAIN=$GITHUB_WORKSPACE/platform/riscv64-linux/riscv64-gcc-toolchain.cmake CMAKE_TOOLCHAIN="--toolchain $TOOLCHAIN" else echo Unknown target ${{inputs.target}} diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index c1bec9e7a..2fb5abd8d 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -55,6 +55,7 @@ jobs: create_ock_artefacts: needs: [workflow_vars] strategy: + fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} @@ -78,6 +79,7 @@ jobs: if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts needs: [workflow_vars] strategy: + fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} From 4241029c826dddb6bb601099aa39d57a493bdad0 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 7 Jan 2025 14:38:51 +0000 Subject: [PATCH 49/78] add riscv64 set-up for ICD build --- .github/actions/do_build_icd/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/do_build_icd/action.yml b/.github/actions/do_build_icd/action.yml index 058ef66c7..9b4daaebe 100644 --- a/.github/actions/do_build_icd/action.yml +++ b/.github/actions/do_build_icd/action.yml @@ -26,6 +26,15 @@ runs: sudo apt-get update sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + - name: riscv64 set-up + if: steps.calc_vars.outputs.arch == 'riscv64' + shell: bash + run: | + echo ARCH is: ${{ steps.calc_vars.outputs.arch }} + set -x + sudo apt-get update + sudo apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu + - name: clone headers uses: actions/checkout@v4 with: From 86fe46273ecea9506ea3dba2d96fce90d7eb3415 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 8 Jan 2025 10:46:47 +0000 Subject: [PATCH 50/78] Add vulkan-sdk install flag --- .github/actions/do_build_ock_artefact/action.yml | 4 ++++ .github/actions/setup_build/action.yml | 6 +++++- .github/workflows/planned_testing.yml | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_ock_artefact/action.yml b/.github/actions/do_build_ock_artefact/action.yml index 2c7f128a9..3b452c49e 100644 --- a/.github/actions/do_build_ock_artefact/action.yml +++ b/.github/actions/do_build_ock_artefact/action.yml @@ -9,6 +9,9 @@ inputs: default: '19' target: description: 'target architecture' + vulkan_sdk_install: + description: 'vulkan install flag' + default: true # TODO: This has not been tested yet on windows so would likely need some updating. runs: @@ -33,6 +36,7 @@ runs: llvm_version: ${{ inputs.llvm_version }} llvm_build_type: RelAssert cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }} + vulkan_sdk_install: ${{ inputs.vulkan_sdk_install }} - name: build ock x86 if: steps.calc_vars.outputs.arch == 'x86_64' diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index f19628efb..2e5841dc7 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -27,6 +27,8 @@ inputs: description: 'Enable installing of clang-tidy (currently 19)' type: boolean default: false + vulkan_sdk_install: + description: 'vulkan install flag' default: true runs: # We don't want a new docker just a list of steps, so mark as composite @@ -53,7 +55,9 @@ runs: if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi pip install lit clang-format==19.1.0 virtualenv sudo apt-get install --yes doxygen - sudo apt-get install --yes vulkan-sdk + if [ "${{ inputs.vulkan_sdk_install }}" = "true" ]; then \ + sudo apt-get install --yes vulkan-sdk + fi if [ "${{ inputs.cross_arch }}" = "x86" ]; then \ sudo apt-get install --yes gcc-multilib g++-multilib libc6-dev:i386 lib32tinfo-dev; \ fi diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 2fb5abd8d..53fd7b225 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -74,6 +74,7 @@ jobs: with: target: ${{ matrix.target }} llvm_version: ${{ inputs.llvm_version }} + vulkan_sdk_install: false build_icd: if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts From 8b519cc507f0d0337186ae926e888e531e4b497f Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 8 Jan 2025 11:14:22 +0000 Subject: [PATCH 51/78] Fix whitespace in vulkan_sdk param --- .github/actions/setup_build/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index b38c80a36..d778dd27a 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -28,7 +28,8 @@ inputs: type: boolean default: false vulkan_sdk_install: - description: 'vulkan install flag' default: true + description: 'vulkan install flag' + default: true runs: # We don't want a new docker just a list of steps, so mark as composite From 89169286b56a1cb148bbd38be8e312cc68413a2e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Wed, 8 Jan 2025 17:03:12 +0000 Subject: [PATCH 52/78] Add riscv64 to opencl build/run --- .github/actions/do_build_opencl_cts/action.yml | 12 ++++++++++++ .github/actions/run_opencl_cts/action.yml | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 8dc34082b..57d6ee23c 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -47,6 +47,18 @@ runs: sudo apt-get update sudo apt-get install --yes qemu-user + - name: riscv64 set-up + if: steps.calc_vars.outputs.arch == 'riscv64' + shell: bash + run: | + #ls -laR + set -x + sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list + sudo dpkg --add-architecture riscv64 + sudo apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu + sudo apt-get update + sudo apt-get install --yes qemu-user + - name: build opencl cts shell: bash env: diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index abcf79faa..b28b00851 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -50,7 +50,7 @@ runs: set -x python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ - $QEMU_SETTING \ + -p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu' \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ From b68b201755f0f2049e33d58015184a306f5ae6aa Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 9 Jan 2025 16:50:09 +0000 Subject: [PATCH 53/78] strip out riscv64 for now --- .../actions/do_build_opencl_cts/action.yml | 12 ----------- .github/actions/run_opencl_cts/action.yml | 20 ++++++++++++++----- .github/workflows/planned_testing.yml | 11 +++------- .github/workflows/planned_testing_caller.yml | 2 +- 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 57d6ee23c..8dc34082b 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -47,18 +47,6 @@ runs: sudo apt-get update sudo apt-get install --yes qemu-user - - name: riscv64 set-up - if: steps.calc_vars.outputs.arch == 'riscv64' - shell: bash - run: | - #ls -laR - set -x - sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list - sudo dpkg --add-architecture riscv64 - sudo apt-get install --yes gcc-riscv64-linux-gnu g++-riscv64-linux-gnu - sudo apt-get update - sudo apt-get install --yes qemu-user - - name: build opencl cts shell: bash env: diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index b28b00851..b885a6b4e 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -33,9 +33,6 @@ runs: if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then echo MATCH ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" - elif [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then - echo MATCH ${{inputs.target}} - QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ @@ -48,9 +45,21 @@ runs: -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" set -x - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout $CTS_TIMEOUT \ + -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + else + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ - -p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu' \ + $QEMU_SETTING \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ @@ -58,3 +67,4 @@ runs: -e "CL_PLATFORM_INDEX=0" \ -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + fi diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 53fd7b225..6429f1351 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -38,7 +38,6 @@ jobs: workflow_vars: runs-on: ubuntu-22.04 outputs: - matrix_only_linux_x86_64_aarch64_riscv64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64 }} matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} steps: @@ -47,7 +46,6 @@ jobs: # These variables are for excluding certain targets from the total list, which is why just including # two targets is a long list of excludes run: | - echo matrix_only_linux_x86_64_aarch64_riscv64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT @@ -58,8 +56,7 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} # risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we # build llvm. Otherwise we choose windows or ubuntu-22.04 depending on the @@ -83,8 +80,7 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} runs-on: ubuntu-22.04 steps: @@ -135,8 +131,7 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - #exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} # TODO: host-x86_64-linux only - expand for other targets runs-on: ubuntu-22.04 diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 5fc46b8ca..a51dc0129 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -21,7 +21,7 @@ jobs: with: # TODO: restore settings #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' - target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' ock: true test_sycl_cts: false test_tornado: false From 77598c95960d8facf91c45bb03eb96ba72cc6111 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Thu, 9 Jan 2025 18:04:43 +0000 Subject: [PATCH 54/78] Update qemu settings logging. --- .github/actions/run_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index b885a6b4e..2105ec632 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -31,7 +31,7 @@ runs: echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then - echo MATCH ${{inputs.target}} + echo QEMU SETTINGS MATCH FOR ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ From 4e268342f1b0d780ddc147fdbf912fddca738604 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 11:06:24 +0000 Subject: [PATCH 55/78] Consolidate opencl CTS run command --- .github/actions/run_opencl_cts/action.yml | 33 +++++++---------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 2105ec632..4f8ba09f1 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -45,26 +45,13 @@ runs: -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" set -x - if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ - --color=always --timeout $CTS_TIMEOUT \ - -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - else - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ - --color=always --timeout $CTS_TIMEOUT \ - $QEMU_SETTING \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - fi + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout $CTS_TIMEOUT \ + $QEMU_SETTING \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" From cd264f484a260fc891fd6d7c66bce961793264f2 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 12:49:50 +0000 Subject: [PATCH 56/78] tweak target list and qemu settings --- .github/actions/run_opencl_cts/action.yml | 2 +- .github/workflows/planned_testing_caller.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 4f8ba09f1..152bf9d72 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -32,7 +32,7 @@ runs: export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then echo QEMU SETTINGS MATCH FOR ${{inputs.target}} - QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" + QEMU_SETTING="-p qemu --qemu \\'/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu\\'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 929bd8e3a..f5eb9ae83 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -25,7 +25,8 @@ jobs: with: # TODO: restore settings #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' - target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' + #target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' + target_list: '["host_aarch64_linux" ]' ock: true test_sycl_cts: false test_tornado: false From f156f9cbe6443db62cf723e097faded691175ffb Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 12:59:27 +0000 Subject: [PATCH 57/78] Use github env var for qemu --- .github/actions/run_opencl_cts/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 152bf9d72..21ed2c120 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -26,13 +26,14 @@ runs: # TODO: host-x86_64-linux filter - expand for other targets CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? + QEMU_SETTING: -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' run: | cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then echo QEMU SETTINGS MATCH FOR ${{inputs.target}} - QEMU_SETTING="-p qemu --qemu \\'/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu\\'" + echo QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ From b006a3f1700ad0e533f8ebbd70c2391bf89719a7 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 13:07:35 +0000 Subject: [PATCH 58/78] qemu setting agin --- .github/actions/run_opencl_cts/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 21ed2c120..a94b18422 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -30,10 +30,10 @@ runs: run: | cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" - export QEMU_SETTING="" + #export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then echo QEMU SETTINGS MATCH FOR ${{inputs.target}} - echo QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" + #QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ From 6c70a8aa9fc17bed0d08a9bcc86d65d017f964bf Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 13:21:26 +0000 Subject: [PATCH 59/78] try eval? --- .github/actions/run_opencl_cts/action.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index a94b18422..c24530897 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -26,14 +26,13 @@ runs: # TODO: host-x86_64-linux filter - expand for other targets CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? - QEMU_SETTING: -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu' run: | cd "$GITHUB_WORKSPACE/OpenCL-CTS" echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER" - #export QEMU_SETTING="" + export QEMU_SETTING="" if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then echo QEMU SETTINGS MATCH FOR ${{inputs.target}} - #QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" + QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ @@ -46,13 +45,14 @@ runs: -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" set -x - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + COMMAND="python -u \"$GITHUB_WORKSPACE/scripts/testing/run_cities.py\" -v \ --color=always --timeout $CTS_TIMEOUT \ $QEMU_SETTING \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + -b \"$GITHUB_WORKSPACE/test_conformance\" \ + -L \"$GITHUB_WORKSPACE/install_icd/lib\" \ + -e \"CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc\" \ + -e \"OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so\" \ + -e \"CL_PLATFORM_INDEX=0\" \ + -s \"$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE\" \ + -i \"$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER\"" + eval $COMMAND From dc84eaeb02cb0f4b6d52b60bcef10a376f43ee0e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 15:31:16 +0000 Subject: [PATCH 60/78] Use double quotes with qemu --- .github/actions/run_opencl_cts/action.yml | 25 ++++++++++---------- .github/workflows/planned_testing_caller.yml | 3 +-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index c24530897..e43d85f67 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -23,7 +23,7 @@ runs: shell: bash env: CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv - # TODO: host-x86_64-linux filter - expand for other targets + # TODO: expand filter for other targets CTS_FILTER: cts-3.0-online-ignore-linux-host.csv CTS_TIMEOUT: 18:00:00 # OK for github? run: | @@ -36,7 +36,7 @@ runs: fi echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ --color=always --timeout $CTS_TIMEOUT \ - $QEMU_SETTING \ + "$QEMU_SETTING" \ -b "$GITHUB_WORKSPACE/test_conformance" \ -L "$GITHUB_WORKSPACE/install_icd/lib" \ -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ @@ -45,14 +45,13 @@ runs: -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" set -x - COMMAND="python -u \"$GITHUB_WORKSPACE/scripts/testing/run_cities.py\" -v \ - --color=always --timeout $CTS_TIMEOUT \ - $QEMU_SETTING \ - -b \"$GITHUB_WORKSPACE/test_conformance\" \ - -L \"$GITHUB_WORKSPACE/install_icd/lib\" \ - -e \"CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc\" \ - -e \"OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so\" \ - -e \"CL_PLATFORM_INDEX=0\" \ - -s \"$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE\" \ - -i \"$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER\"" - eval $COMMAND + python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + --color=always --timeout $CTS_TIMEOUT \ + "$QEMU_SETTING" \ + -b "$GITHUB_WORKSPACE/test_conformance" \ + -L "$GITHUB_WORKSPACE/install_icd/lib" \ + -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ + -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ + -e "CL_PLATFORM_INDEX=0" \ + -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ + -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index f5eb9ae83..929bd8e3a 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -25,8 +25,7 @@ jobs: with: # TODO: restore settings #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' - #target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' - target_list: '["host_aarch64_linux" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' ock: true test_sycl_cts: false test_tornado: false From 04071c6e341b9d664a0334b6adcd50a36a392f8d Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 15:52:02 +0000 Subject: [PATCH 61/78] restore eval for qemu --- .github/actions/run_opencl_cts/action.yml | 37 ++++++++++++----------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index e43d85f67..8aff8b029 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -34,24 +34,25 @@ runs: echo QEMU SETTINGS MATCH FOR ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi - echo python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + echo python -u $GITHUB_WORKSPACE/scripts/testing/run_cities.py -v \ --color=always --timeout $CTS_TIMEOUT \ - "$QEMU_SETTING" \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + $QEMU_SETTING \ + -b $GITHUB_WORKSPACE/test_conformance \ + -L $GITHUB_WORKSPACE/install_icd/lib \ + -e CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc \ + -e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so \ + -e CL_PLATFORM_INDEX=0 \ + -s $GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE \ + -i $GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER set -x - python -u "$GITHUB_WORKSPACE/scripts/testing/run_cities.py" -v \ + RUN_CITIES="python -u $GITHUB_WORKSPACE/scripts/testing/run_cities.py -v \ --color=always --timeout $CTS_TIMEOUT \ - "$QEMU_SETTING" \ - -b "$GITHUB_WORKSPACE/test_conformance" \ - -L "$GITHUB_WORKSPACE/install_icd/lib" \ - -e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \ - -e "OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so" \ - -e "CL_PLATFORM_INDEX=0" \ - -s "$GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE" \ - -i "$GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + $QEMU_SETTING \ + -b $GITHUB_WORKSPACE/test_conformance \ + -L $GITHUB_WORKSPACE/install_icd/lib \ + -e CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc \ + -e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so \ + -e CL_PLATFORM_INDEX=0 \ + -s $GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE \ + -i $GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" + eval RUN_CITIES From 79399083e18d6d52b3d7ca374ac9357cb7c2c723 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Fri, 10 Jan 2025 16:01:41 +0000 Subject: [PATCH 62/78] Add mising $ --- .github/actions/run_opencl_cts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index 8aff8b029..c8328fedf 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -55,4 +55,4 @@ runs: -e CL_PLATFORM_INDEX=0 \ -s $GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE \ -i $GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER" - eval RUN_CITIES + eval $RUN_CITIES From d605263089b3022c38e24d41dcf89e5e817c89b3 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 10:30:38 +0000 Subject: [PATCH 63/78] Tidy for review --- .../actions/do_build_opencl_cts/action.yml | 1 - .github/actions/run_opencl_cts/action.yml | 10 ------- .github/workflows/create_llvm.yml | 6 ++--- .github/workflows/planned_testing_caller.yml | 20 +++++++------- .github/workflows/run_pr_tests_caller.yml | 26 +++++++++---------- 5 files changed, 25 insertions(+), 38 deletions(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 8dc34082b..650a61445 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -39,7 +39,6 @@ runs: if: steps.calc_vars.outputs.arch == 'aarch64' shell: bash run: | - #ls -laR set -x sudo sed -i -e '/^deb /{h;s|deb |&[arch=amd64,i386] |p;g;s|deb http://[^ ]*|deb [arch=arm64,riscv64] http://ports.ubuntu.com/ubuntu-ports|p;d}' /etc/apt/sources.list sudo dpkg --add-architecture arm64 diff --git a/.github/actions/run_opencl_cts/action.yml b/.github/actions/run_opencl_cts/action.yml index c8328fedf..4470c556f 100644 --- a/.github/actions/run_opencl_cts/action.yml +++ b/.github/actions/run_opencl_cts/action.yml @@ -34,16 +34,6 @@ runs: echo QEMU SETTINGS MATCH FOR ${{inputs.target}} QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'" fi - echo python -u $GITHUB_WORKSPACE/scripts/testing/run_cities.py -v \ - --color=always --timeout $CTS_TIMEOUT \ - $QEMU_SETTING \ - -b $GITHUB_WORKSPACE/test_conformance \ - -L $GITHUB_WORKSPACE/install_icd/lib \ - -e CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc \ - -e OCL_ICD_FILENAMES=$GITHUB_WORKSPACE/install_ock/lib/libCL.so \ - -e CL_PLATFORM_INDEX=0 \ - -s $GITHUB_WORKSPACE/test_conformance/$CTS_CSV_FILE \ - -i $GITHUB_WORKSPACE/source/cl/scripts/$CTS_FILTER set -x RUN_CITIES="python -u $GITHUB_WORKSPACE/scripts/testing/run_cities.py -v \ --color=always --timeout $CTS_TIMEOUT \ diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index f3da41d1d..d12662b94 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -6,9 +6,9 @@ on: - main paths: - '.github/workflows/create_llvm.yml' - #pull_request: - # paths: - # - '.github/workflows/create_llvm.yml' + pull_request: + paths: + - '.github/workflows/create_llvm.yml' schedule: # Run Mon-Fri at 5pm - cron: '00 17 * * 1-5' diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 929bd8e3a..d9f4584b3 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - pull_request: - paths: - - '.github/workflows/planned_testing.yml' - - '.github/workflows/planned_testing_caller.yml' - branches: - - main + #pull_request: + # paths: + # - '.github/workflows/planned_testing.yml' + # - '.github/workflows/planned_testing_caller.yml' + # branches: + # - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' @@ -23,12 +23,10 @@ jobs: if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule' uses: ./.github/workflows/planned_testing.yml with: - # TODO: restore settings - #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' - target_list: '["host_x86_64_linux", "host_aarch64_linux" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' ock: true - test_sycl_cts: false - test_tornado: false + test_sycl_cts: true + test_tornado: true test_opencl_cts: true # Have a pull request setting which can be used to test the flow as best as possible # in a reasonable time diff --git a/.github/workflows/run_pr_tests_caller.yml b/.github/workflows/run_pr_tests_caller.yml index 06bea0e07..3df7768d1 100644 --- a/.github/workflows/run_pr_tests_caller.yml +++ b/.github/workflows/run_pr_tests_caller.yml @@ -1,19 +1,19 @@ # Calling workflow for running PR style tests name: Run ock tests for PR style testing on: - #pull_request: - # paths: - # - 'source/**' - # - 'clik/**' - # - 'modules/**' - # - 'examples/**' - # - 'cmake/**' - # - 'hal/**' - # - '.github/actions/do_build_ock/**' - # - '.github/actions/setup_build/**' - # - '.github/workflows/run_pr_tests.yml' - # - '.github/workflows/run_pr_tests_caller.yml' - # - 'CMakeLists.txt' + pull_request: + paths: + - 'source/**' + - 'clik/**' + - 'modules/**' + - 'examples/**' + - 'cmake/**' + - 'hal/**' + - '.github/actions/do_build_ock/**' + - '.github/actions/setup_build/**' + - '.github/workflows/run_pr_tests.yml' + - '.github/workflows/run_pr_tests_caller.yml' + - 'CMakeLists.txt' schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' From 1d572ec65e7c72d534323ade42d4146885e49484 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 11:15:32 +0000 Subject: [PATCH 64/78] Restore support for planned testing PR for now. --- .github/workflows/planned_testing_caller.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index d9f4584b3..71c5d4d54 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - #pull_request: - # paths: - # - '.github/workflows/planned_testing.yml' - # - '.github/workflows/planned_testing_caller.yml' - # branches: - # - main + pull_request: + paths: + - '.github/workflows/planned_testing.yml' + - '.github/workflows/planned_testing_caller.yml' + branches: + - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' @@ -25,8 +25,8 @@ jobs: with: target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' ock: true - test_sycl_cts: true test_tornado: true + test_sycl_cts: true test_opencl_cts: true # Have a pull request setting which can be used to test the flow as best as possible # in a reasonable time From bbfe6a7cb5824f470a1cf4a29e30ede1d78c5877 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 13:28:23 +0000 Subject: [PATCH 65/78] opencl cts qemu install for aarch64 only --- .github/actions/do_build_opencl_cts/action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/actions/do_build_opencl_cts/action.yml b/.github/actions/do_build_opencl_cts/action.yml index 650a61445..c12a67d31 100644 --- a/.github/actions/do_build_opencl_cts/action.yml +++ b/.github/actions/do_build_opencl_cts/action.yml @@ -44,7 +44,10 @@ runs: sudo dpkg --add-architecture arm64 sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu sudo apt-get update - sudo apt-get install --yes qemu-user + if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then + echo QEMU INSTALL MATCH FOR ${{inputs.target}} + sudo apt-get install --yes qemu-user + fi - name: build opencl cts shell: bash From a97337f171185de886ce7c883d3f2e858544b43a Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 16:14:20 +0000 Subject: [PATCH 66/78] Add ubuntu24 x86_64/riscv64 to llvm cache --- .github/workflows/create_llvm.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index d12662b94..f4d626774 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -21,16 +21,20 @@ jobs: strategy: matrix: version: [18, 19] - os: [ubuntu-22.04, windows-2019] + os: [ubuntu-22.04, ubuntu-24.04, windows-2019] build_type: [Release, RelAssert] - arch : [x86, x86_64, aarch64] + arch : [x86, x86_64, aarch64i, riscv64] exclude: - # Reduce the versions of llvm for aarch64 & x86 architectures and windows, as + # Reduce the versions of llvm for aarch64, riscv64 & x86 architectures and windows, as # well as any windows os variants to reduce cache usage. - arch: aarch64 version: 18 - arch: aarch64 build_type: Release + - arch: riscv64 + version: 18 + - arch: riscv64 + build_type: Release - arch: x86 version: 18 - arch: x86 @@ -41,8 +45,18 @@ jobs: build_type: Release - os: windows-2019 arch: aarch64 + - os: windows-2019 + arch: riscv64 - os: windows-2019 arch: x86 + - os: ubuntu-24.04 + version: 18 + - os: ubuntu-24.04 + build_type: Release + - os: ubuntu-24.04 + arch: aarch64 + - os: ubuntu-24.04 + arch: x86 include: # We want to set flags related to particular matrix dimensions. To do this # we need to create default values first, and then against particular matrix @@ -56,12 +70,16 @@ jobs: - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/aarch64-toolchain.cmake" -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu arch: aarch64 + - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/riscv64-gcc-toolchain.cmake" + -DLLVM_HOST_TRIPLE=riscv64-unknown-linux-gnu + arch: riscv64 - arch_flags: -DLLVM_BUILD_32_BITS=ON -DLIBXML2_LIBRARIES=IGNORE -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_HOST_TRIPLE=i686-unknown-linux-gnu arch: x86 - build_type: Release build_type_flags: -DCMAKE_BUILD_TYPE=Release # Todo: for risc-v we need to build on ubuntu-24.04 as gcc 13 is required for the dynamic links flags to work + # note: gcc 13 or higher I assume # This will probably require some exclude: on the different os or building all on each os. - os: ubuntu-22.04 os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON @@ -106,6 +124,11 @@ jobs: run: sudo apt-get install --yes g++-aarch64-linux-gnu + - name: install riscv64 build tools + if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'riscv64' }} + run: + sudo apt-get install --yes g++-riscv64-linux-gnu + - name: install x86 build tools if: ${{ steps.cache.outputs.cache-hit != 'true' && matrix.arch == 'x86' }} run: | From b535246abc25a17b7f5a9333db31bdb789915d10 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 16:27:14 +0000 Subject: [PATCH 67/78] tidy runs - llvm cache only --- .github/workflows/create_llvm.yml | 4 ++- .github/workflows/planned_testing_caller.yml | 12 ++++----- .github/workflows/run_pr_tests_caller.yml | 26 ++++++++++---------- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index f4d626774..0678a5b1c 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -23,7 +23,7 @@ jobs: version: [18, 19] os: [ubuntu-22.04, ubuntu-24.04, windows-2019] build_type: [Release, RelAssert] - arch : [x86, x86_64, aarch64i, riscv64] + arch : [x86, x86_64, aarch64, riscv64] exclude: # Reduce the versions of llvm for aarch64, riscv64 & x86 architectures and windows, as # well as any windows os variants to reduce cache usage. @@ -83,6 +83,8 @@ jobs: # This will probably require some exclude: on the different os or building all on each os. - os: ubuntu-22.04 os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON + - os: ubuntu-24.04 + os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 71c5d4d54..68d394f02 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - pull_request: - paths: - - '.github/workflows/planned_testing.yml' - - '.github/workflows/planned_testing_caller.yml' - branches: - - main + #pull_request: + # paths: + # - '.github/workflows/planned_testing.yml' + # - '.github/workflows/planned_testing_caller.yml' + # branches: + # - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' diff --git a/.github/workflows/run_pr_tests_caller.yml b/.github/workflows/run_pr_tests_caller.yml index 3df7768d1..06bea0e07 100644 --- a/.github/workflows/run_pr_tests_caller.yml +++ b/.github/workflows/run_pr_tests_caller.yml @@ -1,19 +1,19 @@ # Calling workflow for running PR style tests name: Run ock tests for PR style testing on: - pull_request: - paths: - - 'source/**' - - 'clik/**' - - 'modules/**' - - 'examples/**' - - 'cmake/**' - - 'hal/**' - - '.github/actions/do_build_ock/**' - - '.github/actions/setup_build/**' - - '.github/workflows/run_pr_tests.yml' - - '.github/workflows/run_pr_tests_caller.yml' - - 'CMakeLists.txt' + #pull_request: + # paths: + # - 'source/**' + # - 'clik/**' + # - 'modules/**' + # - 'examples/**' + # - 'cmake/**' + # - 'hal/**' + # - '.github/actions/do_build_ock/**' + # - '.github/actions/setup_build/**' + # - '.github/workflows/run_pr_tests.yml' + # - '.github/workflows/run_pr_tests_caller.yml' + # - 'CMakeLists.txt' schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' From 80c45f4b970b17badc527b598771de5c6c03cc1e Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 16:36:43 +0000 Subject: [PATCH 68/78] add fail-fast and fix riscv toolchain filename --- .github/workflows/create_llvm.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index 0678a5b1c..bda67db82 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -19,6 +19,7 @@ permissions: {} jobs: create_llvm_cache: strategy: + fail-fast: false # at least for now matrix: version: [18, 19] os: [ubuntu-22.04, ubuntu-24.04, windows-2019] @@ -70,7 +71,7 @@ jobs: - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/aarch64-toolchain.cmake" -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu arch: aarch64 - - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/arm-linux/riscv64-gcc-toolchain.cmake" + - arch_flags: -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/ock/platform/riscv64-linux/riscv64-gcc-toolchain.cmake" -DLLVM_HOST_TRIPLE=riscv64-unknown-linux-gnu arch: riscv64 - arch_flags: -DLLVM_BUILD_32_BITS=ON -DLIBXML2_LIBRARIES=IGNORE -DLLVM_ENABLE_TERMINFO=OFF From 4edf3476be3697961c55e35783072ed215e0539c Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Mon, 13 Jan 2025 17:03:40 +0000 Subject: [PATCH 69/78] exclude riscv64 from 22.04 --- .github/workflows/create_llvm.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index bda67db82..55a6b6e73 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -54,6 +54,8 @@ jobs: version: 18 - os: ubuntu-24.04 build_type: Release + - os: ubuntu-22.04 + arch: riscv64 - os: ubuntu-24.04 arch: aarch64 - os: ubuntu-24.04 From 7f41bbd38895b2b3c9d9ce3794394dedbfdbcbe4 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 12:54:29 +0000 Subject: [PATCH 70/78] add initial riscv64 support --- .github/workflows/create_llvm.yml | 6 +++--- .github/workflows/planned_testing_caller.yml | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create_llvm.yml b/.github/workflows/create_llvm.yml index 55a6b6e73..bc56aad45 100644 --- a/.github/workflows/create_llvm.yml +++ b/.github/workflows/create_llvm.yml @@ -6,9 +6,9 @@ on: - main paths: - '.github/workflows/create_llvm.yml' - pull_request: - paths: - - '.github/workflows/create_llvm.yml' + #pull_request: + # paths: + # - '.github/workflows/create_llvm.yml' schedule: # Run Mon-Fri at 5pm - cron: '00 17 * * 1-5' diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 68d394f02..7e1ac5467 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -23,10 +23,11 @@ jobs: if: github.repository == 'uxlfoundation/oneapi-construction-kit' || github.event_name != 'schedule' uses: ./.github/workflows/planned_testing.yml with: - target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + #target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux", "host_i686_linux", "host_refsi_linux", "host_x86_64_windows" ]' + target_list: '["host_x86_64_linux", "host_aarch64_linux", "host_riscv64_linux" ]' ock: true - test_tornado: true - test_sycl_cts: true + test_tornado: false + test_sycl_cts: false test_opencl_cts: true # Have a pull request setting which can be used to test the flow as best as possible # in a reasonable time From 48bd7ae5212455bca2158c2d180b8c6dd20decce Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 13:07:11 +0000 Subject: [PATCH 71/78] Add further riscv64 support --- .github/workflows/planned_testing.yml | 12 ++++++------ .github/workflows/planned_testing_caller.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index 792f364ef..ae8c2461f 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -38,7 +38,7 @@ jobs: workflow_vars: runs-on: ubuntu-22.04 outputs: - matrix_only_linux_x86_64_aarch64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64 }} + matrix_only_linux_x86_64_aarch64_riscv64: ${{ steps.vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64 }} matrix_only_linux_x86_64: ${{ steps.vars.outputs.matrix_only_linux_x86_64 }} steps: - id: vars @@ -76,7 +76,7 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} # risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we # build llvm. Otherwise we choose ubuntu-22.04 (use a container for both for consistency). @@ -103,9 +103,9 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} - runs-on: ubuntu-22.04 + runs-on: ${{ contains(matrix.target, 'host_riscv') && 'ubuntu-24.04' || 'ubuntu-22.04' }} steps: - name: clone ock platform uses: actions/checkout@v4 @@ -128,7 +128,7 @@ jobs: target: ${{ fromJson(inputs.target_list) }} exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }} - # Todo: expand for aarch64 + # Todo: expand for aarch64 and riscv64 runs-on: ubuntu-22.04 steps: - name: clone ock platform @@ -154,7 +154,7 @@ jobs: fail-fast: false # let all matrix jobs complete matrix: target: ${{ fromJson(inputs.target_list) }} - exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }} + exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64_riscv64) }} # TODO: host-x86_64-linux only - expand for other targets runs-on: cp-ubuntu-24.04 diff --git a/.github/workflows/planned_testing_caller.yml b/.github/workflows/planned_testing_caller.yml index 7e1ac5467..db60fa843 100644 --- a/.github/workflows/planned_testing_caller.yml +++ b/.github/workflows/planned_testing_caller.yml @@ -2,12 +2,12 @@ name: Run planned testing on: # Note: use pull_request: for localized testing only - #pull_request: - # paths: - # - '.github/workflows/planned_testing.yml' - # - '.github/workflows/planned_testing_caller.yml' - # branches: - # - main + pull_request: + paths: + - '.github/workflows/planned_testing.yml' + - '.github/workflows/planned_testing_caller.yml' + branches: + - main schedule: # Run Mon-Fri at 7pm - cron: '00 19 * * 1-5' From 7fa3427cc460ed17a08a4f636b91b533d15cd5c2 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 13:30:30 +0000 Subject: [PATCH 72/78] add riscv64 to matrix var --- .github/workflows/planned_testing.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/planned_testing.yml b/.github/workflows/planned_testing.yml index ae8c2461f..b81d08281 100644 --- a/.github/workflows/planned_testing.yml +++ b/.github/workflows/planned_testing.yml @@ -46,6 +46,7 @@ jobs: # These variables are for excluding certain targets from the total list, which is why just including # two targets is a long list of excludes run: | + echo matrix_only_linux_x86_64_aarch64_riscv64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64_aarch64="[ {\"target\": \"host_arm_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT echo matrix_only_linux_x86_64="[ {\"target\": \"host_aarch64_linux\"}, {\"target\": \"host_riscv64_linux\"}, {\"target\": \"host_arm_linux\"}, {\"target\": \"host_refsi_linux\"}, {\"target\": \"host_i686_linux\"}, {\"target\": \"host_x86_64_windows\"}]" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT From 0f503201c416674fec40aac2fd33dcacd3cba038 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 13:59:44 +0000 Subject: [PATCH 73/78] add pipx for 24.04 --- .github/actions/setup_build/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index b9ea22a60..2bb84ef90 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -59,7 +59,8 @@ runs: sudo apt-get update if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi - pip install lit clang-format==19.1.0 virtualenv + sudo apt-get pipx + pipx install lit clang-format==19.1.0 virtualenv # required for gtest-terse-runner running in docker sudo apt-get install --yes python3-colorama sudo apt-get install --yes doxygen From 21f4bd81a1248e94c68b70839181fd8a84dbee7a Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 14:06:22 +0000 Subject: [PATCH 74/78] fix pipx install --- .github/actions/setup_build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index 2bb84ef90..4c05a2358 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -59,7 +59,7 @@ runs: sudo apt-get update if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi - sudo apt-get pipx + sudo apt-get install pipx pipx install lit clang-format==19.1.0 virtualenv # required for gtest-terse-runner running in docker sudo apt-get install --yes python3-colorama From 040f571334fb387fa3654fbaa911e58a231eb619 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 14:08:46 +0000 Subject: [PATCH 75/78] fix pipx install again --- .github/actions/setup_build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index 4c05a2358..47ce3dd5a 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -59,7 +59,7 @@ runs: sudo apt-get update if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi - sudo apt-get install pipx + sudo apt-get install --yes pipx pipx install lit clang-format==19.1.0 virtualenv # required for gtest-terse-runner running in docker sudo apt-get install --yes python3-colorama From 32629db1902eb66429565adb76df48d20059f5bd Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 16:27:54 +0000 Subject: [PATCH 76/78] setup is 24.04 if riscv --- .github/actions/do_build_ock_artefact/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/do_build_ock_artefact/action.yml b/.github/actions/do_build_ock_artefact/action.yml index ba8d0c5eb..075b3adb3 100644 --- a/.github/actions/do_build_ock_artefact/action.yml +++ b/.github/actions/do_build_ock_artefact/action.yml @@ -38,6 +38,7 @@ runs: cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }} vulkan_sdk_install: ${{ inputs.vulkan_sdk_install }} os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }} + ubuntu_version: ${{ contains(inputs.target, 'riscv64') && '24.04' || '22.04' }} - name: build ock x86 if: steps.calc_vars.outputs.arch == 'x86_64' From c4b99d522f939a95452689f74ef68618f60f9954 Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 17:27:59 +0000 Subject: [PATCH 77/78] back-out pipx --- .github/actions/setup_build/action.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index 47ce3dd5a..b9ea22a60 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -59,8 +59,7 @@ runs: sudo apt-get update if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi - sudo apt-get install --yes pipx - pipx install lit clang-format==19.1.0 virtualenv + pip install lit clang-format==19.1.0 virtualenv # required for gtest-terse-runner running in docker sudo apt-get install --yes python3-colorama sudo apt-get install --yes doxygen From 2445452df9563ed5c71dc82cc9bd949f762df5ec Mon Sep 17 00:00:00 2001 From: Alan Forbes Date: Tue, 14 Jan 2025 17:45:30 +0000 Subject: [PATCH 78/78] add pipx for 24 again --- .github/actions/setup_build/action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup_build/action.yml b/.github/actions/setup_build/action.yml index b9ea22a60..09998d91a 100644 --- a/.github/actions/setup_build/action.yml +++ b/.github/actions/setup_build/action.yml @@ -58,8 +58,15 @@ runs: fi sudo apt-get update - if [ "${{ inputs.clang_tidy }}" = "true" ]; then sudo apt-get install --yes clang-tidy-19; fi - pip install lit clang-format==19.1.0 virtualenv + if [ "${{ inputs.clang_tidy }}" = "true" ]; then \ + sudo apt-get install --yes clang-tidy-19 + fi + if [ "${{ inputs.ubuntu_version }}" = "24.04" ]; then \ + sudo apt-get install --yes pipx + pipx install lit clang-format==19.1.0 virtualenv + else + pip install lit clang-format==19.1.0 virtualenv + fi # required for gtest-terse-runner running in docker sudo apt-get install --yes python3-colorama sudo apt-get install --yes doxygen