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 riscv testing #636

Draft
wants to merge 84 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 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
a97337f
Add ubuntu24 x86_64/riscv64 to llvm cache
alan-forbes-cp Jan 13, 2025
b535246
tidy runs - llvm cache only
alan-forbes-cp Jan 13, 2025
80c45f4
add fail-fast and fix riscv toolchain filename
alan-forbes-cp Jan 13, 2025
4edf347
exclude riscv64 from 22.04
alan-forbes-cp Jan 13, 2025
7f41bbd
add initial riscv64 support
alan-forbes-cp Jan 14, 2025
48bd7ae
Add further riscv64 support
alan-forbes-cp Jan 14, 2025
7fa3427
add riscv64 to matrix var
alan-forbes-cp Jan 14, 2025
0f50320
add pipx for 24.04
alan-forbes-cp Jan 14, 2025
21f4bd8
fix pipx install
alan-forbes-cp Jan 14, 2025
040f571
fix pipx install again
alan-forbes-cp Jan 14, 2025
32629db
setup is 24.04 if riscv
alan-forbes-cp Jan 14, 2025
c4b99d5
back-out pipx
alan-forbes-cp Jan 14, 2025
6125c22
Merge branch 'main' into alan/OR-652_opencl_cts_riscv_TEMP
alan-forbes-cp Jan 14, 2025
2445452
add pipx for 24 again
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
1 change: 1 addition & 0 deletions .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 9 additions & 2 deletions .github/actions/setup_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 34 additions & 6 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 All @@ -19,18 +19,23 @@ permissions: {}
jobs:
create_llvm_cache:
strategy:
fail-fast: false # at least for now
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, aarch64, 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
Expand All @@ -41,8 +46,20 @@ 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-22.04
arch: riscv64
- 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
Expand All @@ -56,15 +73,21 @@ 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/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
-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
- os: ubuntu-24.04
os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -106,6 +129,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: |
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ 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
# TODO: If we expand on this, come up with a more programmatical way of doing only certain targets.
# 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
Expand Down Expand Up @@ -76,7 +77,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).
Expand All @@ -103,9 +104,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
Expand All @@ -128,7 +129,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
Expand All @@ -154,7 +155,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
Expand Down
19 changes: 10 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 @@ -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
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