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: first #617

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 3 additions & 20 deletions .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,12 @@ inputs:
runs:
using: "composite"
steps:
- name: Download ock artefact
uses: actions/download-artifact@v4
with:
name: ock_${{inputs.target}}
path: install_ock

- name: Run opencl cts
shell: bash
env:
CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv
# TODO: host-x86_64-linux filter - expand for other targets
CTS_FILTER: cts-3.0-online-ignore-linux-host.csv
CTS_TIMEOUT: 18:00:00 # OK for github?
CTS_PROFILE: -p qemu --qemu '/usr/bin/qemu-aarch64 -L /usr/aarch64-linux-gnu'
run: |
cd "$GITHUB_WORKSPACE/OpenCL-CTS"
echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER"
echo CTS_PROFILE IS $CTS_PROFILE
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"
echo CTS_PROFILE IS $CTS_PROFILE
148 changes: 0 additions & 148 deletions .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,103 +33,12 @@ on:

jobs:

# Calculate some useful variables that can be used through the workflow
# Currently this can be used to exclude all but certain targets in matrices
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: ${{ 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="[ {\"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:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

# risc-v needs ubuntu 24.04 so we get the latest qemu as well as how we
# build llvm. Otherwise we choose windows or ubuntu-22.04 depending on the
# target.
runs-on: ${{ (contains(matrix.target, 'host_riscv') && 'ubuntu-24.04') || (contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' ) }}
if : inputs.ock
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build ock artefact
uses: ./.github/actions/do_build_ock_artefact
with:
target: ${{ matrix.target }}
llvm_version: ${{ inputs.llvm_version }}

build_icd:
if: inputs.test_tornado || inputs.test_opencl_cts || inputs.test_sycl_cts
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64_aarch64) }}

runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
- name : build and upload icd ${{matrix.target}}
uses: ./.github/actions/do_build_icd
with:
target: ${{matrix.target}}


# Currently only builds and runs on x86_64 linux
build_run_tornado:
if: inputs.test_tornado
needs: [ workflow_vars, build_icd, create_ock_artefacts ]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

# Todo: expand for aarch64
runs-on: ubuntu-22.04
steps:
- name: clone ock platform
uses: actions/checkout@v4
with:
sparse-checkout: |
platform
.github
# TODO: Consider separating out tornado build and run in the future
- name : build and upload tornado
uses: ./.github/actions/do_build_tornado
with:
target: ${{ matrix.target }}
- name : run tornado
uses: ./.github/actions/run_tornado
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:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

# TODO: host-x86_64-linux only - expand for other targets
runs-on: ubuntu-22.04
Expand All @@ -143,65 +52,8 @@ jobs:
scripts
source
.github
# TODO: Consider separating out opencl_cts build and run in the future
- name : build and upload opencl_cts
uses: ./.github/actions/do_build_opencl_cts
with:
target: ${{ matrix.target }}
- name : run opencl_cts
uses: ./.github/actions/run_opencl_cts
with:
target: ${{ matrix.target }}

build_dpcpp_native_host:
needs: [workflow_vars]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: ${{ contains(matrix.target, 'windows') && 'windows-2019' || 'ubuntu-22.04' }}
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/do_build_dpcpp
with:
target: ${{ matrix.target }}

build_sycl_cts:
needs: [workflow_vars, build_icd, build_dpcpp_native_host]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
# TODO: For now just linux x86_64
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: 'ubuntu-22.04'
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/do_build_sycl_cts
with:
target: ${{ matrix.target }}

run_sycl_cts:
needs: [workflow_vars, create_ock_artefacts, build_dpcpp_native_host, build_sycl_cts]
strategy:
matrix:
target: ${{ fromJson(inputs.target_list) }}
# TODO: For now just linux x86_64
exclude: ${{ fromJson(needs.workflow_vars.outputs.matrix_only_linux_x86_64) }}

runs-on: 'ubuntu-22.04'
if : inputs.test_sycl_cts
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: build dpc++ artefact
uses: ./.github/actions/run_sycl_cts
with:
target: ${{ matrix.target }}
17 changes: 7 additions & 10 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,7 @@ 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" ]'
ock: true
test_tornado: true
test_sycl_cts: true
target_list: '["host_aarch64_linux"]'
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