Skip to content

Commit 1a4d14f

Browse files
authored
Win bdistwheel part3 (#496)
* Win bdistwheel part3
1 parent 2baf28d commit 1a4d14f

File tree

4 files changed

+86
-16
lines changed

4 files changed

+86
-16
lines changed

scripts/azure-pipelines.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,59 @@ jobs:
167167
artifact: 'package_$(Agent.JobName)_$(Agent.OS)'
168168
displayName: bdist_wheel_local_win_package
169169

170+
- job: build_conda_dpnp_dpctl_win
171+
displayName: build_conda_dpnp_dpctl_win
172+
timeoutInMinutes: 120
173+
pool:
174+
vmImage: 'windows-2019' # 'vs2017-win2016'
175+
strategy:
176+
matrix:
177+
Python37:
178+
python.version: '3.7'
179+
steps:
180+
- task: UsePythonVersion@0
181+
inputs:
182+
versionSpec: '$(python.version)'
183+
addToPath: true
184+
displayName: 'Use Python $(python.version)'
185+
186+
- script: set PYTHONUNBUFFERED=1
187+
displayName: make output unbuffered
188+
189+
- script: |
190+
call scripts\install_system_deps_win.bat
191+
displayName: Install Intel ONE API
192+
timeoutInMinutes: 60
193+
194+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
195+
displayName: Add conda to PATH
196+
197+
- script: |
198+
conda create -y -n env python=%PYTHON_VERSION% conda-build=3.18
199+
displayName: conda create with Python $(python.version)
200+
201+
- script: |
202+
call activate env
203+
call scripts\build_deps_dpctl_win.bat
204+
displayName: Build DPCtl
205+
206+
- script: |
207+
call activate env
208+
call scripts\install_cmake_win.bat
209+
echo ========================= Intel OneAPI setvars ===============================
210+
set "ONEAPI_ROOT=C:\Program Files (x86)\Intel\oneAPI\"
211+
call "%ONEAPI_ROOT%\compiler\latest\env\vars.bat"
212+
call "%ONEAPI_ROOT%\dpl\latest\env\vars.bat"
213+
call "%ONEAPI_ROOT%\tbb\latest\env\vars.bat"
214+
echo =================== conda build DPNP ===========================
215+
call conda build conda-recipe -c intel
216+
mkdir dist
217+
echo ========== it doesn't work yet =========================
218+
displayName: build_conda
219+
- publish: dist
220+
artifact: 'build_conda_dpnp_dpctl_$(Agent.JobName)_$(Agent.OS)'
221+
displayName: build_conda_dpnp_dpctl_win_package
222+
170223
# test python ./setup.py bdist_wheel command with dpctl
171224
- job: wheel_dpnp_dpctl_lin
172225
displayName: bdist_wheel_dpnp_dpctl_lin

scripts/build_deps_dpctl_win.bat

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
echo +++++++++++++++++++++++++ Build DPCTL 0.5.0rc2 +++++++++++++++++++++++++++
2-
git clone --branch 0.5.0rc2 https://github.com/IntelPython/dpctl.git
1+
rem git clone --branch 0.5.0rc2 https://github.com/IntelPython/dpctl.git
2+
rem for /f "tokens=* delims=" %%a in ('git tag -l') do git tag -d %%a
3+
rem git tag 0.5.0rc2
34

5+
echo +++++++++++++++++++++++++ Python version +++++++++++++++++++++++++++
6+
call python --version
7+
echo +++++++++++++++++++++++++ Downlowd DPCTL +++++++++++++++++++++++++++
8+
call git clone https://github.com/IntelPython/dpctl.git
49
cd dpctl
510

6-
:: didn't find better way to set required version
7-
for /f "tokens=* delims=" %%a in ('git tag -l') do git tag -d %%a
8-
git tag 0.5.0rc2
11+
set "ONEAPI_ROOT=C:\Program Files (x86)\Intel\oneAPI\"
12+
echo +++++++++++++++++++++++++ Build DPCTL +++++++++++++++++++++++++++
13+
call conda build --croot=C:/tmp conda-recipe --no-test -c "%ONEAPI_ROOT%\conda_channel"
914

10-
conda build --croot=C:/tmp conda-recipe -c "%ONEAPI_ROOT%\conda_channel"
15+
echo +++++++++++++++++++++++++ install DPCTL +++++++++++++++++++++++++++
16+
call conda install -y dpctl --strict-channel-priority -c local -c intel
17+
18+
cd ..
19+
echo +++++++++++++++++++++++++ cleanup DPCTL sources +++++++++++++++++++++++++++
20+
del /F/Q/S dpctl
1121

1222
dir /s/b "%ONEAPI_ROOT%\libDPCTLSyclInterface.so"
23+
24+
call conda list

scripts/install_cmake_win.bat

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ echo ========================= install cmake ==================================
77
:: dir "C:\Program Files\CMake\bin"
88
:: set PATH="C:\Program Files\CMake\bin";%PATH%
99

10-
curl.exe --output cmake_webimage.zip ^
11-
--url https://cmake.org/files/v3.19/cmake-3.19.2-win64-x64.zip --retry 5 --retry-delay 5
10+
call curl.exe --output cmake_webimage.zip ^
11+
--url https://cmake.org/files/v3.19/cmake-3.19.2-win64-x64.zip ^
12+
--retry 5 --retry-delay 5
1213

13-
tar -xf cmake_webimage.zip
14+
call tar -xf cmake_webimage.zip
1415
del cmake_webimage.zip
1516
set PATH=%CD%\cmake-3.19.2-win64-x64\bin;%PATH%
1617

17-
cmake --version
18+
call cmake --version

scripts/install_system_deps_win.bat

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,22 @@
7777
:: call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
7878

7979
echo ========================= download oneapi ================================
80-
curl.exe --output webimage.exe ^
81-
--url https://registrationcenter-download.intel.com/akdlm/irc_nas/17453/w_BaseKit_p_2021.1.0.2664_offline.exe ^
82-
--retry 5 --retry-delay 5
80+
set "ONEAPI_WEB_URL=https://registrationcenter-download.intel.com/akdlm/irc_nas/17453/w_BaseKit_p_2021.1.0.2664_offline.exe"
81+
call curl.exe --output webimage.exe ^
82+
--url %ONEAPI_WEB_URL% ^
83+
--retry 5 ^
84+
--retry-delay 5
8385

8486
start /b /wait webimage.exe -s -x -f webimage_extracted
8587
del webimage.exe
8688

8789
echo ========================= install onepai =================================
8890
:: it is expected that multy-line end-line symbol will be diffrent on MS :-)
89-
webimage_extracted\bootstrapper.exe -s --action install ^
90-
--eula=accept --continue-with-optional-error=yes ^
91-
-p=NEED_VS2017_INTEGRATION=0 -p=NEED_VS2019_INTEGRATION=0
91+
call webimage_extracted\bootstrapper.exe -s --action install ^
92+
--eula=accept ^
93+
--continue-with-optional-error=yes ^
94+
-p=NEED_VS2017_INTEGRATION=0 ^
95+
-p=NEED_VS2019_INTEGRATION=0
9296

9397
echo ========================= copy OpenCL ====================================
9498
dir "C:\Program Files (x86)\Intel\oneAPI\intelpython\python3.7\Library"

0 commit comments

Comments
 (0)