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,numba_mlir_k,numba_mlir_n,numba_mlir_p
15+ WORKLOADS : python,numpy,dpnp,numba_n,numba_np,numba_npr,numba_dpex_k,numba_dpex_n,numba_dpex_p
1516
1617jobs :
17- build_linux :
18+ build :
1819 name : Build and run
1920
2021 strategy :
2122 fail-fast : false
2223 matrix :
2324 os : ["ubuntu-latest", "windows-latest"]
24- python : ["3.9", "3.10"]
25+ python : ["3.9", "3.10", "3.11" ]
2526 sycl : ["sycl","no-sycl"]
2627 install : ["pip", "setup.py"]
28+ exclude :
29+ # setuptools<64 + scikit-build produce 'UNKOWN' package name for
30+ # python 3.11. Could not find exact reference for that issue.
31+ # latest setuptools is unable to create editable environment for pip
32+ - python : " 3.11"
33+ install : " pip"
34+ sycl : " sycl"
2735 include :
2836 - sycl : sycl
2937 os : ubuntu-latest
4048
4149 runs-on : ${{matrix.os}}
4250
51+ defaults :
52+ run :
53+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -el {0}' }}
54+
4355 steps :
4456 - name : Cancel Previous Runs
4557 uses : styfle/cancel-workflow-action@0.6.0
5163 with :
5264 fetch-depth : 0
5365
66+ # intel:numpy for python 3.11 is not upstreamed yet
67+ - name : Patch numpy dependency for Python 3.11
68+ if : matrix.python == '3.11'
69+ shell : bash -l {0}
70+ run : |
71+ find ./environments -type f | xargs sed -i 's/intel::numpy/numpy/'
72+ find ./environments -type f | xargs sed -i '/numba-mlir/d'
73+ find ./environments -type f | xargs sed -i 's/setuptools>=42,<64/setuptools/'
74+
5475 - name : Setup miniconda
5576 uses : conda-incubator/setup-miniconda@v2
5677 with :
@@ -63,25 +84,10 @@ jobs:
6384 run-post : false
6485
6586 - name : Conda info
66- shell : bash -el {0}
6787 run : |
6888 conda info
6989 conda list
7090
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-
8591 - name : Configure Python
8692 if : runner.os == 'Windows'
8793 shell : pwsh
@@ -98,6 +104,20 @@ jobs:
98104 $env:FN="Windows-IntelLLVM.cmake"
99105 Copy-Item ".github\workflows\Windows-IntelLLVM_${env:PATCHED_CMAKE_VERSION}.cmake" "${env:PLATFORM_DIR}\${env:FN}"
100106
107+ # TODO: remove it once it is removed from hard dependency. Not presented
108+ # in conda-forge version, but there are some blockers before we could use
109+ # it.
110+ - name : Remove vs env
111+ if : runner.os == 'Windows' && matrix.sycl == 'sycl'
112+ run : |
113+ conda remove --force vs2017_win-64
114+
115+ - name : Configure MSBuild
116+ if : runner.os == 'Windows' && matrix.sycl == 'sycl'
117+ uses : ilammy/msvc-dev-cmd@v1
118+ with :
119+ toolset : 14.35
120+
101121 - name : Configure Sycl
102122 if : matrix.sycl == 'sycl'
103123 shell : bash -el {0}
@@ -108,31 +128,47 @@ jobs:
108128 echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV"
109129 echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
110130
131+ - name : Configure compiler
132+ run : |
133+ echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
134+
135+ - name : Configure OneAPI
136+ run : |
137+ echo "ONEAPI_DEVICE_SELECTOR=opencl:cpu" >> "$GITHUB_ENV"
138+
139+ - name : Populate conda environment paths
140+ shell : pwsh
141+ if : runner.os == 'Windows'
142+ run : |
143+ echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV
144+ echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV
145+
111146 - name : Build dpbench
112147 if : matrix.install == 'pip'
113- shell : bash -el {0}
114- run : |
115- pip install \
116- --no-index --no-deps --no-build-isolation -e . -v
148+ run : pip install --no-index --no-deps --no-build-isolation -e . -v
117149
118150 - name : Build dpbench
119151 if : matrix.install == 'setup.py'
120- shell : bash -el {0}
121- run : |
122- python setup.py develop
152+ run : python setup.py develop
123153
124- - name : Run benchmarks
154+ - name : Configure dpbench
125155 shell : bash -el {0}
126156 run : |
127- export NUMBA_MLIR_GPU_RUNTIME=sycl
157+ # TODO: do we need GPU in github acions?
158+ echo "NUMBA_MLIR_GPU_RUNTIME=sycl" >> "GITHUB_ENV"
128159 # 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
160+ echo "NUMBA_DPEX_FALLBACK_ON_CPU=0" >> "GITHUB_ENV"
132161
133- dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1
162+ - name : Setup OpenCL CPU device
163+ if : runner.os == 'Windows'
164+ shell : pwsh
165+ run : |
166+ $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
167+ &$script_path
168+ echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
169+
170+ - name : Run benchmarks
171+ run : dpbench -i ${{env.WORKLOADS}} run -r2 --no-print-results || exit 1
134172
135173 - name : Generate report
136- shell : bash -el {0}
137- run : |
138- dpbench -i ${WORKLOADS} report || exit 1
174+ run : dpbench -i ${{env.WORKLOADS}} report || exit 1
0 commit comments