Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ updates:
directory: "/"
schedule:
interval: "weekly"
day: "saturday"
rebase-strategy: "disabled"
2 changes: 1 addition & 1 deletion .github/workflows/build-with-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
with:
packages: |
cython
setuptools
setuptools>=77
pytest

- name: List oneAPI folder content
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ env:
jobs:
build_linux:
runs-on: ubuntu-latest

strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand All @@ -34,6 +36,7 @@ jobs:
- name: Set pkgs_dirs
run: |
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc

- name: Cache conda packages
uses: actions/cache@v4
env:
Expand All @@ -48,8 +51,10 @@ jobs:

- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH

- name: Install conda-build
run: conda install conda-build

- name: Build conda package
run: |
CHANNELS="-c conda-forge -c https://software.repos.intel.com/python/conda --override-channels"
Expand All @@ -61,6 +66,7 @@ jobs:
$VERSIONS \
$CHANNELS \
conda-recipe

- name: Upload artifact
uses: actions/[email protected]
with:
Expand All @@ -75,6 +81,7 @@ jobs:
python: ['3.9', '3.10', '3.11', '3.12']
env:
conda-bld: C:\Miniconda\conda-bld\win-64\

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
Expand All @@ -86,6 +93,7 @@ jobs:
fetch-depth: 0
- uses: conda-incubator/setup-miniconda@v3
with:
conda-remove-defaults: true
auto-activate-base: true
activate-environment: ""

Expand All @@ -100,10 +108,13 @@ jobs:
restore-keys: |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-

- name: Install conda-build
run: conda install conda-build

- name: Build conda package
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge --override-channels conda-recipe

- name: Upload artifact
uses: actions/[email protected]
with:
Expand All @@ -128,10 +139,13 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}

- name: Add conda to system path
run: echo $CONDA/bin >> $GITHUB_PATH

- name: Install conda-build
run: conda install conda-build

- name: Create conda channel
run: |
mkdir -p $GITHUB_WORKSPACE/channel/linux-64
Expand All @@ -141,16 +155,19 @@ jobs:
# Test channel
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json
cat ver.json

- name: Collect dependencies
run: |
. $CONDA/etc/profile.d/conda.sh
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
cat lockfile

- name: Set pkgs_dirs
run: |
echo "pkgs_dirs: [~/.conda/pkgs]" >> ~/.condarc

- name: Cache conda packages
uses: actions/cache@v4
env:
Expand All @@ -171,6 +188,7 @@ jobs:
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
# Test installed packages
conda list

- name: Run tests
run: |
. $CONDA/etc/profile.d/conda.sh
Expand All @@ -197,11 +215,13 @@ jobs:
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
- uses: conda-incubator/setup-miniconda@v3
with:
conda-remove-defaults: true
auto-activate-base: true
activate-environment: ""

- name: Install conda-build
# Needed to be able to run conda index
run: conda install conda-build

- name: Create conda channel
run: |
mkdir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
Expand All @@ -210,6 +230,7 @@ jobs:
# Test channel
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json
more ${{ env.GITHUB_WORKSPACE }}\ver.json

- name: Collect dependencies
shell: cmd
run: |
Expand All @@ -221,6 +242,7 @@ jobs:
)
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }} --only-deps --dry-run > lockfile
more lockfile

- name: Cache conda packages
uses: actions/cache@v4
env:
Expand All @@ -232,6 +254,7 @@ jobs:
restore-keys: |
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-python-${{ matrix.python }}-
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-

# add intel-openmp as an explicit dependency
# to avoid it being missed when package version is specified exactly
- name: Install mkl-service
Expand All @@ -247,6 +270,7 @@ jobs:
conda create -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %WORKAROUND_DEPENDENCIES% pytest python=${{ matrix.python }} -c ${{ env.GITHUB_WORKSPACE }}/channel ${{ env.CHANNELS }}
# Test installed packages
conda list

- name: Run tests
run: |
conda activate -n ${{ env.TEST_ENV_NAME }}
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
=====================
`mkl-service` changelog
=====================
=======================

2.3.0
=====
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
@rem Remember to activate compiler, if needed

set MKLROOT=%CONDA_PREFIX%
%PYTHON% setup.py install
%PYTHON% -m pip install --no-build-isolation --no-deps .
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

# make sure that compiler has been sourced, if necessary

MKLROOT=$CONDA_PREFIX $PYTHON setup.py install
MKLROOT=$CONDA_PREFIX $PYTHON -m pip install --no-build-isolation --no-deps .
10 changes: 5 additions & 5 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ requirements:
- {{ compiler('c') }}
host:
- python
- setuptools
- mkl-devel >=2019.3
- setuptools >=77
- mkl-devel
- cython
run:
- python
- mkl >=2019.3
- mkl

test:
requires:
Expand All @@ -40,15 +40,15 @@ about:
license_file: LICENSE.txt
license_family: BSD
description:
Intel(R) Math Kernel Library (Intel(R) MKL) support functions are
Intel(R) OneAPI Math Kernel Library (OneMKL) support functions are
subdivided into the following groups according to their purpose, such as
Version Information
Threading Control
Timing
Memory Management
Conditional Numerical Reproducibility Control
Miscellaneous
summary: Python hooks for Intel(R) Math Kernel Library runtime control settings.
summary: Python hooks for Intel(R) OneMKL runtime control settings.

extra:
recipe-maintainers:
Expand Down
4 changes: 1 addition & 3 deletions mkl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,4 @@ def __exit__(self, *args):
del sys

from ._py_mkl_service import *


__version__ = '2.4.2'
from ._version import __version__
1 change: 1 addition & 0 deletions mkl/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "2.4.2"
77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright (c) 2025, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of Intel Corporation nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=77", "Cython"]

[project]
authors = [
{name = "Intel Corporation", email = "[email protected]"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Programming Language :: C",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development",
"Topic :: Utilities",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix"
]
dependencies = []
description = "Python hooks for Intel® OneAPI Math Kernel Library (OneMKL) runtime control settings"
dynamic = ["version"]
keywords = ["MKL"]
license = "BSD-3-Clause"
name = "mkl-service"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.9,<3.13"

[project.optional-dependencies]
test = ["pytest"]

[project.urls]
Download = "http://github.com/IntelPython/mkl-service"
Homepage = "http://github.com/IntelPython/mkl-service"

[tool.setuptools]
include-package-data = true
packages = ["mkl"]

[tool.setuptools.dynamic]
version = {attr = "mkl._version.__version__"}

[tool.setuptools.package-data]
"mkl" = ["tests/*.py"]
Loading