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 :
23- os : ["ubuntu-latest", "windows-latest"]
24- python : ["3.9", "3.10"]
25- sycl : ["sycl","no-sycl"]
26- install : ["pip", "setup.py"]
24+ # os: ["ubuntu-latest", "windows-latest"]
25+ # python: ["3.9", "3.10", "3.11"]
26+ # sycl: ["sycl","no-sycl"]
27+ # install: ["pip", "setup.py"]
28+ os : ["windows-latest"]
29+ python : ["3.9"]
30+ sycl : ["sycl"]
31+ install : ["setup.py"]
2732 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: ubuntu-latest
35+ # cc: icx
36+ # cxx: icpx
37+ # environment: conda-linux-sycl.yml
3338 - sycl : sycl
3439 os : windows-latest
3540 cc : icx
3641 cxx : icx
3742 environment : conda-win-sycl.yml
38- - sycl : no-sycl
39- environment : conda.yml
43+ # - sycl: no-sycl
44+ # environment: conda.yml
4045
4146 runs-on : ${{matrix.os}}
4247
48+ defaults :
49+ run :
50+ shell : ${{ matrix.os == 'windows-latest' && 'cmd /C CALL {0}' || 'bash -l {0}' }}
51+
4352 steps :
4453 - name : Cancel Previous Runs
4554 uses : styfle/cancel-workflow-action@0.6.0
5160 with :
5261 fetch-depth : 0
5362
63+ # intel:numpy for python 3.11 is not upstreamed yet
64+ # - name: Patch numpy dependency for Python 3.11
65+ # if: matrix.python == '3.11'
66+ # shell: bash -l {0}
67+ # run: |
68+ # find ./environments -type f | xargs sed -i 's/intel::numpy/numpy/'
69+ # find ./environments -type f | xargs sed -i '/numba-mlir/d'
70+
5471 - name : Setup miniconda
5572 uses : conda-incubator/setup-miniconda@v2
5673 with :
@@ -63,31 +80,17 @@ jobs:
6380 run-post : false
6481
6582 - name : Conda info
66- shell : bash -el {0}
67- run : |
68- conda info
69- conda list
83+ run : conda info
7084
85+ - name : Conda list
86+ run : conda list
7187
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-
85- - name : Configure Python
86- if : runner.os == 'Windows'
87- shell : pwsh
88- run : |
89- # Set python encoding to support utf-8 symblos like ms.
90- echo "PYTHONIOENCODING=utf-8" >> $env:GITHUB_ENV
88+ # - name: Configure Python
89+ # if: runner.os == 'Windows'
90+ # shell: pwsh
91+ # run: |
92+ # # Set python encoding to support utf-8 symblos like ms.
93+ # echo "PYTHONIOENCODING=utf-8" >> $env:GITHUB_ENV
9194
9295 - name : Patch IntelLLVM cmake
9396 if : runner.os == 'Windows' && matrix.sycl == 'sycl'
@@ -97,6 +100,18 @@ jobs:
97100 $env:PLATFORM_DIR="${env:CONDA_PREFIX}\Library\share\cmake-${env:PATCHED_CMAKE_VERSION}\Modules\Platform"
98101 $env:FN="Windows-IntelLLVM.cmake"
99102 Copy-Item ".github\workflows\Windows-IntelLLVM_${env:PATCHED_CMAKE_VERSION}.cmake" "${env:PLATFORM_DIR}\${env:FN}"
103+
104+ # - uses: ilammy/msvc-dev-cmd@v1
105+ # with:
106+ # toolset: 14.35
107+
108+ # - name: Set VC environment
109+ # if: runner.os == 'Windows' && matrix.sycl == 'sycl'
110+ # run: |
111+ # set PATH="%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\"
112+ # call vcvarsall.bat -vcvars_ver=14.35
113+ # set "LIB=%CONDA_PREFIX%\Library\lib;%CONDA_PREFIX%\compiler\lib;%LIB%"
114+ # set "INCLUDE=%CONDA_PREFIX%\include;%INCLUDE%"
100115
101116 - name : Configure Sycl
102117 if : matrix.sycl == 'sycl'
@@ -107,32 +122,84 @@ jobs:
107122 echo "CXX=${{matrix.cxx}}" >> "$GITHUB_ENV"
108123 echo "DPBENCH_SYCL=1" >> "$GITHUB_ENV"
109124 echo "WORKLOADS=$WORKLOADS,sycl" >> "$GITHUB_ENV"
125+ echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
126+
127+ # - name: LIST Environment variables
128+ # run: SET
129+
130+ # - name: Configure MSBuild
131+ # if: runner.os == 'Windows'
132+ # uses: microsoft/setup-msbuild@v1.3
133+ # with:
134+ # # https://www.intel.com/content/www/us/en/developer/articles/reference-implementation/intel-compilers-compatibility-with-microsoft-visual-studio-and-xcode.html
135+ # # https://github.com/actions/runner-images/blob/main/images/win/Windows2022-Readme.md
136+ # vs-version: '[17.0,17.6.4]'
110137
111138 - name : Build dpbench
112139 if : matrix.install == 'pip'
113- shell : bash -el {0}
114- run : |
115- pip install \
116- --no-index --no-deps --no-build-isolation -e . -v
140+ run : pip install --no-index --no-deps --no-build-isolation -e . -v
141+
142+ # - uses: ilammy/msvc-dev-cmd@v1
143+ # with:
144+ # toolset: 14.35
145+ # set "INCLUDE=C:\Miniconda3\envs\build\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Miniconda3\envs\build\Library\include"
146+ # set "LIB=C:\Miniconda3\envs\build\Library\lib;C:\Miniconda3\envs\build\compiler\lib;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22621.0\\um\x64;C:\Miniconda3\envs\build\Library\lib;C:\Miniconda3\envs\build\compiler\lib"
147+ # set "LIBPATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22621.0;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\ATLMFC\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\lib\x64;C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.16.27023\lib\x86\store\references;C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0;C:\Program Files (x86)\Windows Kits\10\References\10.0.22621.0;C:\Windows\Microsoft.NET\Framework64\v4.0.30319"
117148
118149 - name : Build dpbench
119150 if : matrix.install == 'setup.py'
120- shell : bash -el {0}
121151 run : |
152+ CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.35
153+ set "LIB=%CONDA_PREFIX%\Library\lib;%CONDA_PREFIX%\compiler\lib;%LIB%"
154+ set "INCLUDE=%CONDA_PREFIX%\include;%INCLUDE%"
155+ set "CC=${{matrix.cc}}"
156+ set "CXX=${{matrix.cxx}}"
157+ set "DPBENCH_SYCL=1"
158+ set "CMAKE_GENERATOR=Ninja"
159+ set "CMAKE_ARGS=-DCMAKE_BUILD_TYPE=Release"
160+ set "CMAKE_GEN=Visual Studio 17 2022"
161+ set "CMAKE_GENERATOR_PLATFORM=x64"
162+ set "CMAKE_GENERATOR_TOOLSET=v141"
163+ set "CMAKE_PLAT=x64"
164+ set "CONDA_BUILD_CROSS_COMPILATION=0"
165+ set "DISTUTILS_USE_SDK=1"
166+ set "PY_VCRUNTIME_REDIST=\bin\vcruntime140.dll"
167+ set "RUNNER_NAME=GitHub Actions 3"
168+ set "STATS_PT=20"
169+ set "USE_NEW_CMAKE_GEN_SYNTAX=1"
170+ set "VCVARSBAT=64"
171+ set "VS_MAJOR=15"
172+ set "VS_VERSION=15.0"
173+ set "VS_YEAR=2017"
174+ set "WindowsSDKVer=10.0.22621.0"
175+ set "__VSCMD_PREINIT_VS170COMNTOOLS=C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\"
176+ SET
122177 python setup.py develop
123178
124- - name : Run benchmarks
179+ - name : Configure dpbench
125180 shell : bash -el {0}
126181 run : |
127182 export NUMBA_MLIR_GPU_RUNTIME=sycl
128183 # Turn off numba-dpex autofall back
129184 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
132185
133- dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1
186+ - name : Setup OpenCL CPU device
187+ if : runner.os == 'Windows'
188+ shell : pwsh
189+ run : |
190+ $script_path="$env:CONDA_PREFIX\Scripts\set-intel-ocl-icd-registry.ps1"
191+ &$script_path
192+ echo "OCL_ICD_FILENAMES=$env:CONDA_PREFIX\Library\lib\intelocl64.dll" >> $env:GITHUB_ENV
193+ echo "LIB=$env:CONDA_PREFIX\Library\lib;$env:CONDA_PREFIX\compiler\lib;$env:LIB" >> $env:GITHUB_ENV
194+ echo "INCLUDE=$env:CONDA_PREFIX\include;$env:INCLUDE" >> $env:GITHUB_ENV
195+ # Check the variable assisting OpenCL CPU driver to find TBB DLLs which are not located where it expects them by default
196+ $cl_cfg="$env:CONDA_PREFIX\Library\lib\cl.cfg"
197+ Get-Content -Tail 5 -Path $cl_cfg
198+
199+ - name : Run benchmarks
200+ shell : bash -el {0}
201+ run : dpbench -i ${WORKLOADS} run -r2 --no-print-results || exit 1
134202
135203 - name : Generate report
136204 shell : bash -el {0}
137- run : |
138- dpbench -i ${WORKLOADS} report || exit 1
205+ run : dpbench -i ${WORKLOADS} report || exit 1
0 commit comments