Skip to content
Draft
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
* Raised the minimum build-time `Cython` requirement to `3.1.0`, the first release providing the `freethreading_compatible` directive [gh-255](https://github.com/IntelPython/mkl_umath/pull/255)
* Pinned Cython in the Coverity Scan workflow so generated code stays stable between scans, and added `coverity/README.md` documenting the known Cython-boilerplate false positives and the scan review checklist [gh-266](https://github.com/IntelPython/mkl_umath/pull/266)
* Migrated the installed RPATH handling to `meson-python`'s `install_rpath` argument, replacing the previous `-Wl,-rpath` `link_args` workaround, and raised the minimum build-time `meson-python` requirement to `0.22.0` [gh-274](https://github.com/IntelPython/mkl_umath/pull/274)

### Fixed
* Fixed `absolute` (float32/float64) returning `-NaN` for `+NaN` input on the scalar fallback path (same issue as numpy/numpy@dc478c58b9, gh-31433) [gh-269](https://github.com/IntelPython/mkl_umath/pull/269)
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe-cf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ requirements:
- {{ stdlib('c') }}
- {{ compiler('dpcpp') }} >=2024.2 # [not osx]
host:
- meson-python >=0.16.0
- meson-python >=0.22.0
- cmake
- ninja
- git
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requirements:
- {{ stdlib('c') }}
- {{ compiler('dpcpp') }} >=2024.2 # [not osx]
host:
- meson-python >=0.16.0
- meson-python >=0.22.0
- cmake
- ninja
- git
Expand Down
31 changes: 23 additions & 8 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -149,18 +149,30 @@ gen_loops_h = custom_target(
depends: gen_umath_c
)

rpath_link_args = []
# Runtime library search paths for the installed targets, relative to each
# target's own location:
# - origin -> the mkl_umath package directory, where
# libmkl_umath_loops.so is installed alongside the
# extension modules that link against it
# - origin/../.. \ the environment's library directory, where the MKL
# - origin/../../.. / runtime libraries live
# These are applied via the install_rpath argument. Empty on Windows,
# which has no RPATH concept.
install_rpath_dirs = ''
if host_machine.system() != 'windows'
if host_machine.system() == 'darwin'
origin = '@loader_path'
else
origin = '$ORIGIN'
endif

rpath_link_args = [
'-Wl,-rpath,' + origin / '../..',
'-Wl,-rpath,' + origin / '../../..',
]
install_rpath_dirs = ':'.join(
[
origin,
origin / '../..',
origin / '../../..',
]
)
endif

# define <target>_EXPORTS for Windows dllexport
Expand All @@ -170,7 +182,8 @@ mkl_umath_loops = shared_library(
include_directories: inc_np,
dependencies: [mkl_dep, py_dep],
c_args: c_args + ['-Dmkl_umath_loops_EXPORTS'],
link_args: link_args + rpath_link_args,
link_args: link_args,
install_rpath: install_rpath_dirs,
install: true,
install_dir: py.get_install_dir() / 'mkl_umath'
)
Expand All @@ -185,7 +198,8 @@ py.extension_module(
include_directories: inc_np,
dependencies: [mkl_dep, loops_dep],
c_args: c_args + ['-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'],
link_args: link_args + rpath_link_args,
link_args: link_args,
install_rpath: install_rpath_dirs,
install: true,
subdir: 'mkl_umath'
)
Expand All @@ -197,7 +211,8 @@ py.extension_module(
dependencies: [loops_dep],
c_args: c_args + ['-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION'],
cython_args: ['-3', '--fast-fail'],
link_args: link_args + rpath_link_args,
link_args: link_args,
install_rpath: install_rpath_dirs,
install: true,
subdir: 'mkl_umath'
)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
[build-system]
build-backend = "mesonpy"
requires = [
"meson-python>=0.16.0",
"meson-python>=0.22.0",
"ninja",
"Cython>=3.1.0",
"numpy",
Expand Down
Loading