Skip to content

Commit

Permalink
Add basic structure for aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp committed Dec 13, 2024
1 parent 931d7a7 commit 3ae7c11
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
32 changes: 31 additions & 1 deletion .github/actions/do_build_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,37 @@ runs:
repository: KhronosGroup/OpenCL-CTS
path: OpenCL-CTS

- name: build opencl cts
- name: build opencl cts x86_64
if: ARCH == x86_64
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"
run: |
# get spirv-as
sudo apt-get update
sudo apt-get install -y spirv-tools
# apply patches
pushd OpenCL-CTS
git log -1
git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0001-Patch-sub-group-testing.patch
git apply $GITHUB_WORKSPACE/.github/patches/OpenCL-CTS-0002-Permit-building-for-unknown-architectures.patch
popd
# do build
set -x
cmake -G Ninja $CMAKE_TOOLCHAIN $GITHUB_WORKSPACE/OpenCL-CTS \
-DCMAKE_BUILD_TYPE=Release \
-DOPENCL_LIBRARIES=OpenCL \
-DCL_INCLUDE_DIR=$GITHUB_WORKSPACE/install_headers/include \
-DCL_LIB_DIR=$GITHUB_WORKSPACE/install_icd/lib
ninja -v
python3 $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/assemble_spirv.py -v \
--source-dir $GITHUB_WORKSPACE/OpenCL-CTS/test_conformance/spirv_new/spirv_asm \
--output-dir $GITHUB_WORKSPACE/test_conformance/spirv_bin
- name: build opencl cts aarch64
if: ARCH == aarch64
shell: bash
env:
# TODO: host-x86_64-linux 'toolchain' - expand for other targets
Expand Down
25 changes: 24 additions & 1 deletion .github/actions/run_opencl_cts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,30 @@ runs:
name: ock_${{inputs.target}}
path: install_ock

- name: Run opencl cts
- name: Run opencl cts x86_64
if: ARCH == x86_64
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?
run: |
cd "$GITHUB_WORKSPACE/OpenCL-CTS"
echo "Running OpenCL CTS tests with CTS file $CTS_CSV_FILE with filter $CTS_FILTER"
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"
- name: Run opencl cts aarch64
if: ARCH == aarch64
shell: bash
env:
CTS_CSV_FILE: opencl_conformance_tests_${{inputs.test_type}}.csv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/planned_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
strategy:
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 Down

0 comments on commit 3ae7c11

Please sign in to comment.