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

DRAFT: opencl cts aarch64 / riscv #611

Draft
wants to merge 45 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 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
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
34 changes: 23 additions & 11 deletions .github/actions/do_build_icd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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-aarch64-linux-gnu g++-aarch64-linux-gnu

- name: clone headers
uses: actions/checkout@v4
with:
Expand All @@ -25,11 +34,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 @@ -50,13 +61,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
19 changes: 15 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,24 @@ runs:
repository: KhronosGroup/OpenCL-CTS
path: OpenCL-CTS

- name: build opencl cts
- name: aarch64 set-up
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
sudo apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get update
sudo apt-get install --yes qemu-user

- 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
1 change: 1 addition & 0 deletions .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ runs:
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' \
-b "$GITHUB_WORKSPACE/test_conformance" \
-L "$GITHUB_WORKSPACE/install_icd/lib" \
-e "CLC_EXECUTABLE=$GITHUB_WORKSPACE/install_ock/bin/clc" \
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create_llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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' }}
Expand Down
7 changes: 4 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:
needs: [workflow_vars]
strategy:
Expand Down Expand Up @@ -122,14 +121,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 ]
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: ubuntu-22.04
Expand All @@ -139,9 +138,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
20 changes: 11 additions & 9 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/run_pr_tests_caller.yml
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Loading