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 Graviton to Github CI OpenCL CTS planned testing #664

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
8ef3ade
exclude workflow components that aren't needed for development
alan-forbes-cp Jan 29, 2025
fee8ad0
Point opencl cts aarch64 at cp-graviton
alan-forbes-cp Jan 29, 2025
308dd94
Fix graviton for aarch64
alan-forbes-cp Jan 30, 2025
3e33d01
Try running aarch without container
alan-forbes-cp Jan 30, 2025
060c277
fix ${{ error
alan-forbes-cp Jan 30, 2025
ec00d7f
Add quotes around null
alan-forbes-cp Jan 30, 2025
ebd748e
Try null for image ID
alan-forbes-cp Jan 30, 2025
68930f6
Remove container spec for now
alan-forbes-cp Jan 30, 2025
14aa9bf
add spirv-tools
alan-forbes-cp Jan 30, 2025
ece9af3
Add port for arm64 updates
alan-forbes-cp Jan 30, 2025
60314b4
add sudo for sed
alan-forbes-cp Jan 30, 2025
882d2e0
add apt-get update
alan-forbes-cp Jan 30, 2025
f8c59aa
add arch support
alan-forbes-cp Jan 30, 2025
cbaf6e7
back to apt-get install
alan-forbes-cp Jan 30, 2025
fb2dff8
remove qemu
alan-forbes-cp Jan 30, 2025
5e0f55e
add logging
alan-forbes-cp Jan 30, 2025
b0a9187
fix logging
alan-forbes-cp Jan 30, 2025
c4d07a1
tweak logging
alan-forbes-cp Jan 30, 2025
490c089
more log tweaks
alan-forbes-cp Jan 30, 2025
23ab2c9
Reformat target lists
alan-forbes-cp Jan 31, 2025
59e89b3
Refactor for aarch64 docker
alan-forbes-cp Feb 3, 2025
7444cea
point aarch64 at new docker
alan-forbes-cp Feb 3, 2025
e643f1c
tidy formatting
alan-forbes-cp Feb 3, 2025
b26414f
fix image strings
alan-forbes-cp Feb 3, 2025
95533ee
refactor image: again
alan-forbes-cp Feb 3, 2025
e29d8bb
more image:
alan-forbes-cp Feb 3, 2025
4e439d4
add dockerfile for graviton
alan-forbes-cp Feb 3, 2025
e01dbcc
Update dockerfile name and image names
alan-forbes-cp Feb 4, 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
6 changes: 2 additions & 4 deletions .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ runs:
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
QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'"
elif [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then
if [[ "${{inputs.target}}" =~ .*riscv64.* ]] ; then
QEMU_SETTING="-p qemu --qemu '/usr/bin/qemu-riscv64 -L /usr/riscv64-linux-gnu'"
fi
echo QEMU SETTING: $QEMU SETTING
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
9 changes: 9 additions & 0 deletions .github/dockerfiles/Dockerfile_22.04-aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:22.04

RUN apt-get update
RUN apt-get -y install sudo
RUN apt-get install -y git
RUN apt-get install --yes cmake
RUN apt-get install --yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
RUN apt-get install --yes python3 python3-pip
RUN apt-get install --yes spirv-tools
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
packages: read
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
packages: read
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_publish_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run_riscv_m1_nightly_package:
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down
33 changes: 23 additions & 10 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,20 @@ jobs:
- 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
# certain targets involves 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="[ {\"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
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

create_ock_artefacts_windows:
Expand Down Expand Up @@ -97,7 +107,8 @@ jobs:
# build llvm. Otherwise we choose ubuntu-22.04 (use a container for both for consistency).
runs-on: cp-ubuntu-24.04
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest' }}
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
|| 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
if : inputs.ock && contains(inputs.target_list, 'linux')
Expand Down Expand Up @@ -127,7 +138,8 @@ jobs:

runs-on: cp-ubuntu-24.04
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest' }}
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
|| 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
Expand Down Expand Up @@ -180,10 +192,11 @@ jobs:
target: ${{ fromJson(inputs.target_list) }}
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
runs-on: ${{ contains(matrix.target, 'host_aarch64') && 'cp-graviton' || 'cp-ubuntu-24.04' }}
container:
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04:latest' || 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest' }}
image: ${{ contains(matrix.target, 'host_riscv') && 'ghcr.io/uxlfoundation/ock_ubuntu_24.04-x86-64:latest'
|| ( contains(matrix.target, 'host_aarch64') && 'ghcr.io/alan-forbes-cp/ock_ubuntu_22.04-aarch64:latest'
|| 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest' ) }}
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
Expand Down Expand Up @@ -218,7 +231,7 @@ jobs:
# TODO: Extend if we decide to enable for windows or build natively on another target
runs-on: cp-ubuntu-24.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down Expand Up @@ -248,7 +261,7 @@ jobs:
# TODO: Extend if we decide to enable for windows or build natively on another target
runs-on: cp-ubuntu-24.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/planned_testing_caller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ 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_aarch64_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
42 changes: 31 additions & 11 deletions .github/workflows/publish_docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ on:
- '.github/workflows/publish_docker_images.yml'
- '.github/dockerfiles/**'

permissions:
contents: read
packages: write
attestations: write
id-token: write

env:
REGISTRY: ghcr.io/uxlfoundation

jobs:

publish-docker-images:
publish-docker-images-x86-64:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
env:
REGISTRY: ghcr.io/uxlfoundation
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -30,8 +32,26 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker images
run: |
for dockerfile in ${{ github.workspace }}/.github/dockerfiles/Dockerfile_* ; do
VERSION=${dockerfile##*_}
docker build . -f $dockerfile --tag $REGISTRY/ock_ubuntu_$VERSION:latest
for DOCKERFILE in ${{ github.workspace }}/.github/dockerfiles/Dockerfile_*x86-64 ; do
VERSION=${DOCKERFILE##*_}
docker build . -f $DOCKERFILE --tag $REGISTRY/ock_ubuntu_$VERSION:latest
docker push $REGISTRY/ock_ubuntu_$VERSION:latest
done

publish-docker-images-aarch64:
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker images
run: |
DOCKERFILE=${{ github.workspace }}/.github/dockerfiles/Dockerfile_22.04-aarch64
VERSION=${DOCKERFILE##*_}
docker build . -f $DOCKERFILE --tag $REGISTRY/ock_ubuntu_$VERSION:latest
docker push $REGISTRY/ock_ubuntu_$VERSION:latest
2 changes: 1 addition & 1 deletion .github/workflows/run_ock_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run_riscv_m1_ock_demo:
runs-on: ubuntu-22.04
container:
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest'
image: 'ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest'
volumes:
- ${{github.workspace}}:${{github.workspace}}

Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/run_pr_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run_host_x86_64:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:

runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
steps:
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
run_ubuntu_gcc_x86_64_riscv_fp16_cl3_0_unitcl_vecz:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
run-ubuntu-clang-x86-llvm-latest-cl3-0-offline:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 90 # offline needs longer timeout
Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
run-ubuntu-gcc-x86_64-riscv-fp16-cl3-0:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
Expand Down Expand Up @@ -336,7 +336,7 @@ jobs:
run-ubuntu-gcc-x86-llvm-latest-x86_64-images-cl3-0-release:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
Expand Down Expand Up @@ -364,7 +364,7 @@ jobs:
run-ubuntu-gcc-aarch64-llvm-latest-cl3-0-fp16:
runs-on: cp-ubuntu-24.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 90 # aarch64 needs longer timeout
Expand Down Expand Up @@ -396,7 +396,7 @@ jobs:
run-ubuntu-gcc-x86_64-clik-refsi:
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
Expand All @@ -420,7 +420,7 @@ jobs:
if: ${{ !inputs.is_pull_request }} # do not run as PR job for now to avoid flooding the concurrency
runs-on: ubuntu-22.04
container:
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04:latest
image: ghcr.io/uxlfoundation/ock_ubuntu_22.04-x86-64:latest
volumes:
- ${{github.workspace}}:${{github.workspace}}
timeout-minutes: 60
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