Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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: 1 addition & 1 deletion .github/workflows/build-with-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

Comment thread
vchamarthi marked this conversation as resolved.
Comment thread
vchamarthi marked this conversation as resolved.
- name: Install mkl-service dependencies
run: |
pip install meson-python cython cmake ninja
pip install meson-python "cython>=3.1.0" cmake ninja
Comment thread
vchamarthi marked this conversation as resolved.
Comment thread
vchamarthi marked this conversation as resolved.

- name: List oneAPI folder content
run: ls ${{ env.ONEAPI_ROOT }}/compiler
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-with-standard-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

- name: Install mkl-service dependencies
run: |
pip install meson-python cython cmake ninja mkl-devel
pip install meson-python "cython>=3.1.0" cmake ninja mkl-devel

Comment thread
vchamarthi marked this conversation as resolved.
- name: Build mkl-service
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Build with pip
run: |
pip install --no-cache-dir meson-python ninja cmake cython
pip install --no-cache-dir meson-python ninja cmake "cython>=3.1.0"
pip install -e ".[test]" --no-build-isolation --verbose
pip list
python -m pytest -v mkl/tests
4 changes: 1 addition & 3 deletions conda-recipe-cf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ requirements:
- cmake
- ninja
- python
- python-gil # [py>=314]
- pip >=25.0
- mkl-devel # [not osx]
- mkl-devel <2024 # [osx]
- cython
- cython >=3.1.0
- wheel >=0.45.1
run:
- python
- python-gil # [py>=314]
- {{ pin_compatible('mkl') }}

test:
Expand Down
5 changes: 2 additions & 3 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,14 @@ requirements:
- cmake
- ninja
- python
- python-build
Comment thread
vchamarthi marked this conversation as resolved.
Outdated
- python-gil # [py>=314]
Comment thread
vchamarthi marked this conversation as resolved.
Outdated
- python-build >=1.2.2
- pip >=25.0
- mkl-devel
- cython
- cython >=3.1.0
- wheel >=0.45.1
run:
- python
- python-gil # [py>=314]
- {{ pin_compatible('mkl') }}

test:
Expand Down
6 changes: 6 additions & 0 deletions mkl/_mklinitmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ PyMODINIT_FUNC PyInit__mklinit(void)
return NULL;
}

#ifdef Py_GIL_DISABLED
/* Declare that this module supports running without the GIL so the
* free-threaded interpreter does not re-enable it on import. */
PyUnstable_Module_SetGIL(m, Py_MOD_GIL_NOT_USED);
#endif

return m;
}
#else
Expand Down
1 change: 1 addition & 0 deletions mkl/_py_mkl_service.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

# distutils: language = c
# cython: language_level=3
# cython: freethreading_compatible=True

import numbers
import warnings
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ build-backend = "mesonpy"
requires = [
"meson-python>=0.13.0",
"ninja",
"Cython",
"Cython>=3.1.0",
"mkl-devel",
"cmake"
]
Expand Down
Loading