From dbb707e3fe25f292faad70d251e1f82abcf2f05e Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Wed, 7 May 2025 16:05:25 -0700 Subject: [PATCH 1/4] change to dynamic linking and add interface and threading layers --- .github/workflows/build_pip.yaml | 3 +-- CMakeLists.txt | 6 +++++- README.md | 3 ++- conda-recipe-cf/meta.yaml | 3 +-- conda-recipe/meta.yaml | 3 +-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build_pip.yaml b/.github/workflows/build_pip.yaml index f7497a4..5c8ef7b 100644 --- a/.github/workflows/build_pip.yaml +++ b/.github/workflows/build_pip.yaml @@ -42,10 +42,9 @@ jobs: - name: Install Compiler and MKL run: | - conda install mkl-devel mkl-service dpcpp_linux-64 + conda install mkl-devel tbb-devel dpcpp_linux-64 python -c "import sys; print(sys.executable)" which python - python -c "import mkl; print(mkl.__file__)" - name: Build conda package run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index af4e480..e9287fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,11 @@ cmake_print_variables(Python_NumPy_INCLUDE_DIRS) set(CYTHON_FLAGS "-t -w \"${CMAKE_SOURCE_DIR}\"") find_package(Cython REQUIRED) -set(MKL_LINK sdl) +find_package(TBB REQUIRED) +set(MKL_ARCH "intel64") +set(MKL_LINK "dynamic") +set(MKL_THREADING "tbb_thread") +set(MKL_INTERFACE "ilp64") find_package(MKL REQUIRED) if(WIN32) diff --git a/README.md b/README.md index fbfecad..494c712 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ If these are installed as part of a `oneAPI` installation, the following package If build dependencies are to be installed with Conda, the following packages must be installed from the Intel(R) channel - `mkl-devel` +- `tbb-devel` - `dpcpp_linux-64` (or `dpcpp_win-64` for Windows) - `numpy-base` @@ -56,7 +57,7 @@ then the remaining dependencies - `cython` - `scikit-build` -and for `mkl-devel` and `dpcpp_linux-64` in a Conda environment, `MKLROOT` environment variable must be set +and for `mkl-devel`, `tbb-devel` and `dpcpp_linux-64` in a Conda environment, `MKLROOT` environment variable must be set On Linux ```sh export MKLROOT=$CONDA_PREFIX diff --git a/conda-recipe-cf/meta.yaml b/conda-recipe-cf/meta.yaml index 7d1b662..f11bcea 100644 --- a/conda-recipe-cf/meta.yaml +++ b/conda-recipe-cf/meta.yaml @@ -28,11 +28,10 @@ requirements: - scikit-build - python - mkl-devel + - tbb-devel - numpy run: - python - - mkl - - mkl-service - {{ pin_compatible('intel-cmplr-lib-rt') }} test: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index feddb5f..ae00c7a 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -28,11 +28,10 @@ requirements: - scikit-build - python - mkl-devel + - tbb-devel - numpy-base run: - python - - mkl - - mkl-service - {{ pin_compatible('intel-cmplr-lib-rt') }} - {{ pin_compatible('numpy') }} From e76a55053711e105e3ce1e03f3db609d499491a4 Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Thu, 15 May 2025 14:40:50 -0700 Subject: [PATCH 2/4] update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9e2687..429f3d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [dev] (MM/DD/YY) +This release updates `mkl_umath` to be aligned with both numpy-1.26.x and numpy-2.x.x. ### Added -* `mkl_umath` is now aligned with both numpy-1.26,x and numpy-2.x.x [gh-65](https://github.com/IntelPython/mkl_umath/pull/65) +* The definition of `sign` function for complex floating dtypes is updated to match numpy-2.x.x [gh-65](https://github.com/IntelPython/mkl_umath/pull/65) +* `ldexp` function is updated to allow `int64` explicitly similar to numpy-2.x.x behavior [gh-73](https://github.com/IntelPython/mkl_umath/pull/73) ### Changed * Migrated from `setup.py` to `pyproject toml` [gh-63](https://github.com/IntelPython/mkl_umath/pull/63) +* Changed to dynamic linking and add interface and threading layers [gh-72](https://github.com/IntelPython/mkl_umath/pull/72) ### Fixed * Fixed a bug for `mkl_umath.is_patched` function [gh-66](https://github.com/IntelPython/mkl_umath/pull/66) From e5e54545cfb7af22737e1ef326317b11b6111f37 Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Thu, 15 May 2025 14:43:07 -0700 Subject: [PATCH 3/4] fix typos --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 429f3d4..499c28c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,12 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This release updates `mkl_umath` to be aligned with both numpy-1.26.x and numpy-2.x.x. ### Added -* The definition of `sign` function for complex floating dtypes is updated to match numpy-2.x.x [gh-65](https://github.com/IntelPython/mkl_umath/pull/65) +* The definition of `sign` function for complex floating point data types is updated to match numpy-2.x.x [gh-65](https://github.com/IntelPython/mkl_umath/pull/65) * `ldexp` function is updated to allow `int64` explicitly similar to numpy-2.x.x behavior [gh-73](https://github.com/IntelPython/mkl_umath/pull/73) ### Changed * Migrated from `setup.py` to `pyproject toml` [gh-63](https://github.com/IntelPython/mkl_umath/pull/63) -* Changed to dynamic linking and add interface and threading layers [gh-72](https://github.com/IntelPython/mkl_umath/pull/72) +* Changed to dynamic linking and added interface and threading layers [gh-72](https://github.com/IntelPython/mkl_umath/pull/72) ### Fixed * Fixed a bug for `mkl_umath.is_patched` function [gh-66](https://github.com/IntelPython/mkl_umath/pull/66) From af2aceca826a9b8142207f49b455bfc076fd590b Mon Sep 17 00:00:00 2001 From: Vahid Tavanashad Date: Thu, 22 May 2025 21:48:22 -0700 Subject: [PATCH 4/4] switch to lp64 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9287fc..5391aea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ find_package(TBB REQUIRED) set(MKL_ARCH "intel64") set(MKL_LINK "dynamic") set(MKL_THREADING "tbb_thread") -set(MKL_INTERFACE "ilp64") +set(MKL_INTERFACE "lp64") find_package(MKL REQUIRED) if(WIN32)