1111
1212env :
1313 # 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
14+ WORKLOADS : python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p
1515
1616jobs :
17- build_linux :
17+ build :
1818 name : Build and run
1919
2020 strategy :
2121 fail-fast : false
2222 matrix :
2323 os : ["ubuntu-latest", "windows-latest"]
24- python : ["3.9", "3.10"]
24+ python : ["3.9", "3.10", "3.11" ]
2525 sycl : ["sycl","no-sycl"]
2626 install : ["pip", "setup.py"]
27+ exclude :
28+ # setuptools<64 + scikit-build produce 'UNKOWN' package name for
29+ # python 3.11. Could not find exact reference for that issue.
30+ # latest setuptools is unable to create editable environment for pip
31+ - python : " 3.11"
32+ install : " pip"
33+ sycl : " sycl"
2734 include :
2835 - sycl : sycl
2936 os : ubuntu-latest
4047
4148 runs-on : ${{matrix.os}}
4249
50+ defaults :
51+ run :
52+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
53+
4354 steps :
4455 - name : Cancel Previous Runs
45565162 with :
5263 fetch-depth : 0
5364
65+ # intel:numpy for python 3.11 is not upstreamed yet
66+ - name : Patch numpy dependency for Python 3.11
67+ if : matrix.python == '3.11'
68+ shell : bash -l {0}
69+ run : |
70+ find ./environments -type f | xargs sed -i 's/intel::numpy/numpy/'
71+ find ./environments -type f | xargs sed -i '/numba-mlir/d'
72+ find ./environments -type f | xargs sed -i 's/setuptools>=42,<64/setuptools/'
73+
74+ # TODO: remove once numba_mlir support python 3.11
75+ - name : Patch numpy dependency for Python 3.11
76+ if : matrix.python != '3.11'
77+ shell : bash -l {0}
78+ run : |
79+ echo "WORKLOADS=$WORKLOADS,numba_mlir_k,numba_mlir_n,numba_mlir_p" >> "$GITHUB_ENV"
80+
5481 - name : Setup miniconda
5582 uses : conda-incubator/setup-miniconda@v2
5683 with :
@@ -63,25 +90,10 @@ jobs:
6390 run-post : false
6491
6592 - name : Conda info
66- shell : bash -el {0}
6793 run : |
6894 conda info
6995 conda list
7096
71-
72- - name : Setup OpenCL CPU device
73- if : runner.os == 'Windows'
74- shell : pwsh
75- run : |
76- $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
77- &$script_path
78- echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
79- echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV
80- echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV
81- # Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
82- $cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
83- Get-Content -Tail 5 -Path $cl_cfg
84-
8597 - name : Configure Python
8698 if : runner.os == 'Windows'
8799 shell : pwsh
@@ -98,6 +110,20 @@ jobs:
98110 $env:FN="Windows-IntelLLVM.cmake"
99111 Copy-Item ".github\workflows\Windows-IntelLLVM_${env:PATCHED_CMAKE_VERSION}.cmake" "${env:PLATFORM_DIR}\${env:FN}"
100112
113+ # TODO: remove it once it is removed from hard dependency. Not presented
114+ # in conda-forge version, but there are some blockers before we could use
115+ # it.
116+ - name : Remove vs env
117+ if : runner.os == 'Windows' && matrix.sycl == 'sycl'
118+ run : |
119+ conda remove --force vs2017_win-64
120+
121+ - name : Configure MSBuild
122+ if : runner.os == 'Windows' && matrix.sycl == 'sycl'
123+ uses : ilammy/msvc-dev-cmd@v1
124+ with :
125+ toolset : 14.35
126+
101127 - name : Configure Sycl
102128 if : matrix.sycl == 'sycl'
103129 shell : bash -el {0}
@@ -108,31 +134,47 @@ jobs:
108134 echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV"
109135 echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
110136
137+ - name : Configure compiler
138+ run : |
139+ echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
140+
141+ - name : Configure OneAPI
142+ run : |
143+ echo "ONEAPI_DEVICE_SELECTOR=opencl:cpu" >> "$GITHUB_ENV"
144+
145+ - name : Populate conda environment paths
146+ shell : pwsh
147+ if : runner.os == 'Windows'
148+ run : |
149+ echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV
150+ echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV
151+
111152 - name : Build dpbench
112153 if : matrix.install == 'pip'
113- shell : bash -el {0}
114- run : |
115- pip install \
116- --no-index --no-deps --no-build-isolation -e . -v
154+ run : pip install --no-index --no-deps --no-build-isolation -e . -v
117155
118156 - name : Build dpbench
119157 if : matrix.install == 'setup.py'
120- shell : bash -el {0}
121- run : |
122- python setup.py develop
158+ run : python setup.py develop
123159
124- - name : Run benchmarks
160+ - name : Configure dpbench
125161 shell : bash -el {0}
126162 run : |
127- export NUMBA_MLIR_GPU_RUNTIME=sycl
163+ # TODO: do we need GPU in github acions?
164+ echo "NUMBA_MLIR_GPU_RUNTIME=sycl" >> "GITHUB_ENV"
128165 # Turn off numba-dpex autofall back
129- export NUMBA_DPEX_FALLBACK_ON_CPU=0
130- # Make sure numba-dpex is using native atomics in github CI
131- export NUMBA_DPEX_ACTIVATE_ATOMICS_FP_NATIVE=1
166+ echo "NUMBA_DPEX_FALLBACK_ON_CPU=0" >> "GITHUB_ENV"
167+
168+ - name : Setup OpenCL CPU device
169+ if : runner.os == 'Windows'
170+ shell : pwsh
171+ run : |
172+ $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
173+ &$script_path
174+ echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
132175
133- dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1
176+ - name : Run benchmarks
177+ run : dpbench -i ${{env.WORKLOADS}} run -r2 --no-print-results || exit 1
134178
135179 - name : Generate report
136- shell : bash -el {0}
137- run : |
138- dpbench -i ${WORKLOADS} report || exit 1
180+ run : dpbench -i ${{env.WORKLOADS}} report || exit 1
0 commit comments