Skip to content

Commit 97d62c6

Browse files
committed
simplify mkl_umath conda-forge build scripts
also use gnu_thread on Windows
1 parent 9a03cfe commit 97d62c6

3 files changed

Lines changed: 4 additions & 45 deletions

File tree

conda-recipe-cf/bld.bat

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,5 @@ set "INCLUDE=%BUILD_PREFIX%\include;%INCLUDE%"
55
set "CC=icx"
66
set "CXX=icx"
77

8-
%PYTHON% -m build -w -n -x
9-
if %ERRORLEVEL% neq 0 exit 1
10-
11-
for /f %%f in ('dir /b /S .\dist') do (
12-
%PYTHON% -m pip install %%f ^
13-
--no-build-isolation ^
14-
--no-deps ^
15-
--only-binary :all: ^
16-
--no-index ^
17-
--prefix %PREFIX% ^
18-
-vv
19-
if %ERRORLEVEL% neq 0 exit 1
20-
)
21-
22-
if NOT "%WHEELS_OUTPUT_FOLDER%"=="" (
23-
copy dist\mkl_umath*.whl %WHEELS_OUTPUT_FOLDER%
24-
if %ERRORLEVEL% neq 0 exit 1
25-
)
8+
%PYTHON% -m pip install --no-build-isolation --no-deps --config-settings=setup-args="-Dmkl_threading=gnu_thread" .
9+
if errorlevel 1 exit 1

conda-recipe-cf/build.sh

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,3 @@
1-
#!/bin/bash
2-
set -e
1+
#!/bin/bash -x
32

4-
# This is necessary to help DPC++ find Intel libraries such as SVML, IRNG, etc in build prefix
5-
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${BUILD_PREFIX}/lib"
6-
7-
# Intel LLVM must cooperate with compiler and sysroot from conda
8-
echo "--gcc-toolchain=${BUILD_PREFIX} --sysroot=${BUILD_PREFIX}/${HOST}/sysroot -target ${HOST}" > icx_for_conda.cfg
9-
ICXCFG="$(pwd)/icx_for_conda.cfg"
10-
export ICXCFG
11-
12-
read -r GLIBC_MAJOR GLIBC_MINOR <<< "$(conda list '^sysroot_linux-64$' \
13-
| tail -n 1 | awk '{print $2}' | grep -oP '\d+' | head -n 2 | tr '\n' ' ')"
14-
15-
export CMAKE_GENERATOR="Ninja"
16-
SKBUILD_ARGS=(
17-
"--"
18-
"-DCMAKE_C_COMPILER:PATH=icx"
19-
"-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
20-
"-DMKL_THREADING=gnu_thread"
21-
)
22-
23-
if [ -n "${WHEELS_OUTPUT_FOLDER}" ]; then
24-
mkdir -p "${WHEELS_OUTPUT_FOLDER}"
25-
cp dist/mkl_umath*.whl "${WHEELS_OUTPUT_FOLDER}"
26-
fi
3+
CC=icx CXX=icpx $PYTHON -m pip install --no-build-isolation --no-deps -Csetup-args="-Dmkl_threading=gnu_thread" .

conda-recipe-cf/meta.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@ requirements:
2828
- cython
2929
- python
3030
- python-gil # [py>=314]
31-
- python-build
3231
- mkl-devel
3332
- numpy # [not win]
3433
- numpy <2.4 # [win]
3534
# TODO: remove win numpy pin when numpy 2.5 is released, see https://github.com/numpy/numpy/issues/31337
3635
- llvm-openmp
37-
- wheel >=0.41.3
3836
- pip
3937
run:
4038
- python

0 commit comments

Comments
 (0)