1
1
REM A workaround for activate-dpcpp.bat issue to be addressed in 2021.4
2
- SET " LIB = %BUILD_PREFIX% \Library\lib;%BUILD_PREFIX% \compiler\lib;%LIB% "
3
- SET " INCLUDE = %BUILD_PREFIX% \include;%INCLUDE% "
2
+ set " LIB = %BUILD_PREFIX% \Library\lib;%BUILD_PREFIX% \compiler\lib;%LIB% "
3
+ set " INCLUDE = %BUILD_PREFIX% \include;%INCLUDE% "
4
4
5
5
" %PYTHON% " setup.py clean --all
6
6
7
7
set " MKLROOT = %PREFIX% /Library"
8
8
set " TBB_ROOT_HINT = %PREFIX% /Library"
9
9
set " DPL_ROOT_HINT = %PREFIX% /Library"
10
10
11
- set " SKBUILD_ARGS = -G Ninja -- -DCMAKE_C_COMPILER:PATH=icx -DCMAKE_CXX_COMPILER:PATH=icx -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
12
- set " SKBUILD_ARGS = %SKBUILD_ARGS% -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
13
-
14
11
REM Overriding IPO is useful for building in resources constrained VMs (public CI)
15
12
if DEFINED OVERRIDE_INTEL_IPO (
16
- set " SKBUILD_ARGS = %SKBUILD_ARGS % -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
13
+ set " CMAKE_ARGS = %CMAKE_ARGS % -DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=FALSE"
17
14
)
18
15
19
- FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19) DO @ (
16
+ FOR %%V IN (17.0.0 17 18.0.0 18 19.0.0 19 20.0.0 20 21.0.0 21 ) DO @ (
20
17
REM set DIR_HINT if directory exists
21
18
IF EXIST " %BUILD_PREFIX% \Library\lib\clang\%%V \" (
22
- SET " SYCL_INCLUDE_DIR_HINT = %BUILD_PREFIX% \Library\lib\clang\%%V "
19
+ set " SYCL_INCLUDE_DIR_HINT = %BUILD_PREFIX% \Library\lib\clang\%%V "
23
20
)
24
21
)
25
22
@@ -37,21 +34,37 @@ if EXIST "%PLATFORM_DIR%" (
37
34
if errorlevel 1 exit 1
38
35
)
39
36
40
- if NOT " %WHEELS_OUTPUT_FOLDER% " == " " (
41
- rem Install and assemble wheel package from the build bits
42
- " %PYTHON% " setup.py install bdist_wheel %SKBUILD_ARGS%
43
- if errorlevel 1 exit 1
44
- copy dist\dpnp*.whl %WHEELS_OUTPUT_FOLDER%
45
- if errorlevel 1 exit 1
46
- ) ELSE (
47
- rem Only install
48
- " %PYTHON% " setup.py install %SKBUILD_ARGS%
49
- if errorlevel 1 exit 1
37
+ set " CC = icx"
38
+ set " CXX = icx"
39
+
40
+ set " CMAKE_GENERATOR = Ninja"
41
+ :: Make CMake verbose
42
+ set " VERBOSE = 1"
43
+
44
+ %PYTHON% -m build -w -n -x
45
+ if %ERRORLEVEL% neq 0 exit 1
46
+
47
+ :: `pip install dist\numpy*.whl` does not work on windows,
48
+ :: so use a loop; there's only one wheel in dist/ anyway
49
+ for /f %%f in ('dir /b /S .\dist') do (
50
+ %PYTHON% -m wheel tags --remove --build %GIT_DESCRIBE_NUMBER% %%f
51
+ if %ERRORLEVEL% neq 0 exit 1
50
52
)
51
53
52
- rem copy back
53
- if EXIST " %PLATFORM_DIR% " (
54
- rem copy back
55
- copy /Y " %FN% " " %PLATFORM_DIR% \%FN% "
56
- if errorlevel 1 exit 1
54
+ :: wheel file was renamed
55
+ for /f %%f in ('dir /b /S .\dist') do (
56
+ %PYTHON% -m pip install %%f ^
57
+ --no-build-isolation ^
58
+ --no-deps ^
59
+ --only-binary :all: ^
60
+ --no-index ^
61
+ --prefix %PREFIX% ^
62
+ -vv
63
+ if %ERRORLEVEL% neq 0 exit 1
64
+ )
65
+
66
+ :: Copy wheel package
67
+ if NOT " %WHEELS_OUTPUT_FOLDER% " == " " (
68
+ copy dist\dpnp*.whl %WHEELS_OUTPUT_FOLDER%
69
+ if %ERRORLEVEL% neq 0 exit 1
57
70
)
0 commit comments