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

Opencl cts riscv64 linux #660

4 changes: 1 addition & 3 deletions .github/actions/do_build_ock_artefact/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ inputs:
default: '19'
target:
description: 'target architecture'
vulkan_sdk_install:
description: 'vulkan install flag'
default: true
download_ock_artefact:
description: 'download ock artefact rather than building, of form <target>=id;<target2=id2>.'
default: ''
Expand Down Expand Up @@ -41,6 +38,7 @@ runs:
llvm_build_type: RelAssert
cross_arch: ${{ steps.calc_vars.outputs.arch == 'x86_64' && 'none' || steps.calc_vars.outputs.arch }}
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' && contains(inputs.download_ock_artefact, inputs.target) != true
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ 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 QEMU SETTINGS MATCH FOR ${{inputs.target}}
QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"
elif [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then
QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu'"
fi
echo QEMU SETTING: $QEMU SETTING
set -x
# Note: use 'eval' built-in to handle quoting/escaping/splitting reqs
RUN_CITIES="python3 -u $GITHUB_WORKSPACE/scripts/testing/run_cities.py -v \
Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/create_llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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 +45,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
coldav marked this conversation as resolved.
Show resolved Hide resolved
- os: ubuntu-24.04
build_type: Release
- os: ubuntu-22.04
alan-forbes-cp marked this conversation as resolved.
Show resolved Hide resolved
arch: riscv64
- os: ubuntu-24.04
arch: aarch64
- os: ubuntu-24.04
arch: x86
alan-forbes-cp marked this conversation as resolved.
Show resolved Hide resolved
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,6 +72,9 @@ 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
Expand All @@ -65,6 +84,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
coldav marked this conversation as resolved.
Show resolved Hide resolved
os_flags: -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -106,6 +127,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: 6 additions & 7 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,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="[ {\"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_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="[ {\"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 @@ -91,7 +91,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 @@ -114,7 +114,6 @@ jobs:
with:
target: ${{ matrix.target }}
llvm_version: ${{ inputs.llvm_version }}
vulkan_sdk_install: false
download_ock_artefact: ${{ inputs.download_ock_artefact }}

build_icd:
Expand All @@ -124,7 +123,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) }}

runs-on: cp-ubuntu-24.04
container:
Expand Down Expand Up @@ -153,7 +152,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 @@ -179,7 +178,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
7 changes: 4 additions & 3 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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