Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add opencl cts aarch64 linux to planned testing #611

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
7488093
Tweak initial settings
alan-forbes-cp Dec 12, 2024
e173a6e
Add basic structure for aarch64
alan-forbes-cp Dec 13, 2024
0833367
Fix arch vars setting
alan-forbes-cp Dec 13, 2024
f5c4d46
Fix quotes for arch
alan-forbes-cp Dec 13, 2024
85edde8
add 'fail_fast: false' to opencl-cts
alan-forbes-cp Dec 13, 2024
401d0c4
Allow PRs for planned testing - for now
alan-forbes-cp Dec 16, 2024
e662456
add toolchain files
alan-forbes-cp Dec 16, 2024
cf44457
add toolchain files #2
alan-forbes-cp Dec 16, 2024
f991c95
Fix github workspace var
alan-forbes-cp Dec 16, 2024
cec99b1
add aarch64 x-compilers and qemu
alan-forbes-cp Dec 16, 2024
7986308
refactor toolchain and add logging
alan-forbes-cp Dec 16, 2024
481f8bf
Add x-compiler install for ICD
alan-forbes-cp Dec 16, 2024
041e05a
Update ICD cmake for x-compile
alan-forbes-cp Dec 16, 2024
9080a7d
Use pre-set vars
alan-forbes-cp Dec 16, 2024
3b373aa
Update preset vars usage
alan-forbes-cp Dec 16, 2024
bf5c33b
Fix missing env:
alan-forbes-cp Dec 16, 2024
871fac2
Add --toolset (needs proper fix)
alan-forbes-cp Dec 16, 2024
af325d9
Checkout platform for toolchain files
alan-forbes-cp Dec 16, 2024
c15c696
add arch for arm64
alan-forbes-cp Dec 17, 2024
5fae1f0
Update sources.list for aarch64
alan-forbes-cp Dec 17, 2024
73bcb16
Explicitly install ld-linux-aarch64.so.1
alan-forbes-cp Dec 17, 2024
1e82b67
remove libc6 install
alan-forbes-cp Dec 17, 2024
b933162
consolidate targets
alan-forbes-cp Dec 17, 2024
e2158ec
fix quotes
alan-forbes-cp Dec 17, 2024
51cd2de
Fix extra "env:"
alan-forbes-cp Dec 17, 2024
c006ec9
ard-wire new toolchain
alan-forbes-cp Dec 17, 2024
c92a4d9
Restore toolchain file and add find
alan-forbes-cp Dec 17, 2024
4ecf5fb
which qemu
alan-forbes-cp Dec 17, 2024
761c1cd
more logging
alan-forbes-cp Dec 17, 2024
a2ffdfe
more logging
alan-forbes-cp Dec 17, 2024
6b3754e
Add lib paths
alan-forbes-cp Dec 17, 2024
b5d7d76
add cmake messages
alan-forbes-cp Dec 18, 2024
4b8f9e9
Merge branch 'main' into alan/OR-652_opencl_cts_aarch_riscv
alan-forbes-cp Dec 18, 2024
df9ddf1
Unsuffixed compiler versions
alan-forbes-cp Dec 18, 2024
b1874d6
remove logging and toolchain files
alan-forbes-cp Dec 18, 2024
89f5fb6
Add CTS_PROFILE and suppress PR tests
alan-forbes-cp Dec 18, 2024
cc42a6e
Fix target spec for run
alan-forbes-cp Dec 18, 2024
1c30563
add pull path for qemu-aarch64
alan-forbes-cp Dec 18, 2024
8622cab
Fix quoting
alan-forbes-cp Dec 18, 2024
afeaa94
add logging
alan-forbes-cp Dec 19, 2024
171dd77
try escapes
alan-forbes-cp Dec 19, 2024
2733968
moree quotes
alan-forbes-cp Dec 19, 2024
92aaa18
quotes
alan-forbes-cp Dec 19, 2024
3fcca66
mo quo
alan-forbes-cp Dec 19, 2024
0ba2c66
hard-wire qemu
alan-forbes-cp Dec 19, 2024
eda65d0
Initial riscv and qemu shell refactor
alan-forbes-cp Jan 6, 2025
f8d0c8c
Add echo for qemu
alan-forbes-cp Jan 6, 2025
f493fcf
Add initial support for RiscV to planned_testing
alan-forbes-cp Jan 7, 2025
3caf689
Fix riscv64 toolchain file; add fail-fast:false as reqd.
alan-forbes-cp Jan 7, 2025
4241029
add riscv64 set-up for ICD build
alan-forbes-cp Jan 7, 2025
86fe462
Add vulkan-sdk install flag
alan-forbes-cp Jan 8, 2025
8c30351
Merge branch 'main' into alan/OR-652_opencl_cts_aarch_riscv
alan-forbes-cp Jan 8, 2025
8b519cc
Fix whitespace in vulkan_sdk param
alan-forbes-cp Jan 8, 2025
21fce7b
Merge branch 'main' into alan/OR-652_opencl_cts_aarch_riscv
alan-forbes-cp Jan 8, 2025
8916928
Add riscv64 to opencl build/run
alan-forbes-cp Jan 8, 2025
b68b201
strip out riscv64 for now
alan-forbes-cp Jan 9, 2025
77598c9
Update qemu settings logging.
alan-forbes-cp Jan 9, 2025
4e26834
Consolidate opencl CTS run command
alan-forbes-cp Jan 10, 2025
7bb0566
Merge branch 'main' into alan/OR-652_opencl_cts_aarch_riscv
alan-forbes-cp Jan 10, 2025
cd264f4
tweak target list and qemu settings
alan-forbes-cp Jan 10, 2025
f156f9c
Use github env var for qemu
alan-forbes-cp Jan 10, 2025
b006a3f
qemu setting agin
alan-forbes-cp Jan 10, 2025
6c70a8a
try eval?
alan-forbes-cp Jan 10, 2025
dc84eae
Use double quotes with qemu
alan-forbes-cp Jan 10, 2025
96502ad
Merge branch 'main' into alan/OR-652_opencl_cts_aarch_riscv
alan-forbes-cp Jan 10, 2025
04071c6
restore eval for qemu
alan-forbes-cp Jan 10, 2025
7939908
Add mising $
alan-forbes-cp Jan 10, 2025
d605263
Tidy for review
alan-forbes-cp Jan 13, 2025
1d572ec
Restore support for planned testing PR for now.
alan-forbes-cp Jan 13, 2025
bbfe6a7
opencl cts qemu install for aarch64 only
alan-forbes-cp Jan 13, 2025
b825be3
Add comments following review.
alan-forbes-cp Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/calc_vars/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
25 changes: 14 additions & 11 deletions .github/actions/do_build_icd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ 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: |
set -x
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
run:
Expand All @@ -56,13 +58,14 @@ runs:

- name: icd cmake
shell: bash
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
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 }} \
-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
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
os: ${{ contains(inputs.target, 'windows') && 'windows' || 'ubuntu' }}

- name: build ock x86
Expand Down
22 changes: 18 additions & 4 deletions .github/actions/do_build_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,27 @@ runs:
repository: KhronosGroup/OpenCL-CTS
path: OpenCL-CTS

- name: build opencl cts
- name: aarch64 set-up # TODO: update if/when qemu no longer used
if: steps.calc_vars.outputs.arch == 'aarch64'
shell: bash
run: |
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
if [[ "${{inputs.target}}" =~ .*aarch64.* ]] ; then
# TODO: Only needed for run - could be moved to corresponding run action
echo QEMU INSTALL MATCH FOR ${{inputs.target}}
sudo apt-get install --yes qemu-user
alan-forbes-cp marked this conversation as resolved.
Show resolved Hide resolved
fi

- name: build opencl cts
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: "${{ steps.calc_vars.outputs.cmake_toolchain }}"
run: |
echo CMAKE_TOOLCHAIN is: $CMAKE_TOOLCHAIN
# get spirv-as
sudo apt-get update
sudo apt-get install -y spirv-tools
Expand Down
28 changes: 18 additions & 10 deletions .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,27 @@ 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: |
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'"
fi
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"
# Note: use 'eval' built-in to handle quoting/escaping/splitting reqs
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"
eval $RUN_CITIES
alan-forbes-cp marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 6 additions & 1 deletion .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ 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
Expand Down Expand Up @@ -60,7 +63,9 @@ runs:
# required for gtest-terse-runner running in docker
sudo apt-get install --yes python3-colorama
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
# TODO: Only required if we are running something that requires qemu, not required for building
if [ "${{ inputs.cross_arch }}" != "none" ] && [ "${{ inputs.cross_arch }}" != "x86" ]; then \
# Install QEMU for testing cross compilation.
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
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


create_ock_artefacts_windows:
needs: [workflow_vars]
# Currently there is only one windows target so we don't bother with the
Expand All @@ -74,6 +73,7 @@ jobs:
create_ock_artefacts_ubuntu:
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) }}
Expand All @@ -94,11 +94,13 @@ 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
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) }}
Expand Down Expand Up @@ -145,14 +147,14 @@ 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_ubuntu ]
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) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

# TODO: host-x86_64-linux only - expand for other targets
runs-on: cp-ubuntu-24.04
Expand All @@ -166,9 +168,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
Expand Down