1010 branches : [main]
1111
1212env :
13- WORKLOADS : python,numpy,dpnp,sycl,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p,numba_mlir_k,numba_mlir_n,numba_mlir_p
13+ # sycl is not included. Add it manually if you need
14+ WORKLOADS : python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p,numba_mlir_k,numba_mlir_n,numba_mlir_p
1415
1516jobs :
1617 build_linux :
17- name : Builds dpbench and runs the benchmarks
18- runs-on : ubuntu-latest
18+ name : Build and run
1919
2020 strategy :
2121 fail-fast : false
2222 matrix :
23+ os : ["ubuntu-latest", "windows-latest"]
2324 python : ["3.9", "3.10"]
25+ sycl : ["sycl","no-sycl"]
26+ install : ["pip", "setup.py"]
27+ include :
28+ - sycl : sycl
29+ os : ubuntu-latest
30+ cc : icx
31+ cxx : icpx
32+ environment : conda-linux-sycl.yml
33+ - sycl : sycl
34+ os : windows-latest
35+ cc : icx
36+ cxx : icx
37+ environment : conda-win-sycl.yml
38+ - sycl : no-sycl
39+ environment : conda.yml
40+
41+ runs-on : ${{matrix.os}}
2442
2543 steps :
2644 - name : Cancel Previous Runs
@@ -40,35 +58,78 @@ jobs:
4058 python-version : ${{ matrix.python }}
4159 mamba-version : " *"
4260 activate-environment : dpbench-dev
43- environment-file : environments/conda-linux-sycl.yml
61+ environment-file : environments/${{ matrix.environment }}
4462
4563 - name : Conda info
46- shell : bash -l {0}
64+ shell : bash -el {0}
4765 run : |
4866 conda info
4967 conda list
5068
69+ - name : Configure Intel OpenCL CPU RT
70+ if : matrix.os == 'windows-latest'
71+ shell : pwsh
72+ run : |
73+ $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
74+ &$script_path
75+ echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
76+ echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV
77+ echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV
78+ # Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
79+ $cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
80+ Get-Content -Tail 5 -Path $cl_cfg
81+
82+ - name : Configure Python
83+ if : matrix.os == 'windows-latest'
84+ shell : pwsh
85+ run : |
86+ # Set python encoding to support utf-8 symblos like ms.
87+ echo "PYTHONIOENCODING=utf-8" >> $env:GITHUB_ENV
88+
89+ - name : Patch IntelLLVM cmake
90+ if : matrix.os == 'windows-latest' && matrix.sycl == 'sycl'
91+ shell : pwsh
92+ run : |
93+ $env:PATCHED_CMAKE_VERSION="3.26"
94+ $env:PLATFORM_DIR="${env:CONDA_PREFIX}\Library\share\cmake-${env:PATCHED_CMAKE_VERSION}\Modules\Platform"
95+ $env:FN="Windows-IntelLLVM.cmake"
96+ Copy-Item ".github\workflows\Windows-IntelLLVM_${env:PATCHED_CMAKE_VERSION}.cmake" "${env:PLATFORM_DIR}\${env:FN}"
97+
98+ - name : Configure Sycl
99+ if : matrix.sycl == 'sycl'
100+ shell : bash -el {0}
101+ run : |
102+ sycl-ls
103+ echo "CC=${{matrix.cc}}" >> "$GITHUB_ENV"
104+ echo "CXX=${{matrix.cxx}}" >> "$GITHUB_ENV"
105+ echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV"
106+ echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
107+
51108 - name : Build dpbench
52- shell : bash -l {0}
109+ if : matrix.install == 'pip'
110+ shell : bash -el {0}
53111 run : |
54- CC=icx CXX=icpx DPBENCH_SYCL=1 pip install \
112+ pip install \
55113 --no-index --no-deps --no-build-isolation -e . -v
56114
115+ - name : Build dpbench
116+ if : matrix.install == 'setup.py'
117+ shell : bash -el {0}
118+ run : |
119+ python setup.py develop
120+
57121 - name : Run benchmarks
58- shell : bash -l {0}
122+ shell : bash -el {0}
59123 run : |
60- export OCL_ICD_FILENAMES=libintelocl.so
61124 export NUMBA_MLIR_GPU_RUNTIME=sycl
62125 # Turn off numba-dpex autofall back
63126 export NUMBA_DPEX_FALLBACK_ON_CPU=0
64127 # Make sure numba-dpex is using native atomics in github CI
65128 export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
66- ls $(dirname $(dirname `which icx`))/bin-llvm || exit 1
67- export NUMBA_DPEX_LLVM_SPIRV_ROOT=$(dirname $(dirname `which icx`))/bin-llvm
68129
69130 dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1
70131
71132 - name : Generate report
72- shell : bash -l {0}
133+ shell : bash -el {0}
73134 run : |
74135 dpbench -i ${WORKLOADS} report || exit 1
0 commit comments