8000 Integration testing: Meson SIMD + vendored meson-python by rgommers · Pull Request #24395 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Integration testing: Meson SIMD + vendored meson-python #24395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ab496b3
ENH, SIMD: The meson CPU dispatcher implementation
seiko2plus Jul 16, 2023
9a139d3
Provide compatibility with distutils
seiko2plus Jul 18, 2023
166477d
Extend test_requirements/pyproject to cover meson module
seiko2plus Jul 18, 2023
9421795
BUG: Fix SSE build on meson
seiko2plus Jul 18, 2023
0c3111c
fix the build when it disabled
seiko2plus Jul 19, 2023
a78ef6b
enable AVX512_SPR for quicksort
seiko2plus Jul 19, 2023
a3058a9
Add support for build option --test-simd
seiko2plus Jul 19, 2023
e4b3d72
Fix sdist build
seiko2plus Jul 20, 2023
4203a5b
Pass Opt level 3 to all dispach-able sources
seiko2plus Jul 20, 2023
04b2e2a
Disable SIMD kernels of log/exp/sin/cos on clang-cl
seiko2plus Jul 20, 2023
1917470
CI: Transition x86 specialized tests to Meson from Distutils
seiko2plus Jul 21, 2023
0963fe0
Cleanup the main configration header and improves docs
seiko2plus Jul 23, 2023
481114a
Detect global architecture args
seiko2plus Jul 23, 2023
58239f3
update the meson module name
seiko2plus Jul 25, 2023
2271d02
fix SSE41 flag on Intel-cl
seiko2plus Aug 1, 2023
080e19c
rename method multi_target to multi_targets
seiko2plus Aug 1, 2023
35292aa
Disables mmx when AVX512 is enabled similar to distutils
seiko2plus Aug 1, 2023
077a09f
Add build target AVX512_ICL for simd_qsort
seiko2plus Aug 1, 2023
7ec6933
CI: Allow noblas for SIMD tests
seiko2plus Aug 1, 2023
0beab65
Bybass sort validation for _simd module
seiko2plus Aug 2, 2023
f580462
Removes build option boolean warning
seiko2plus Aug 2, 2023
de71d9b
removes py_dep from _simd extention
seiko2plus Aug 2, 2023
dedd413
fix Initlize typo
seiko2plus Aug 2, 2023
a751c20
Minimize the log of CPU optimization
seiko2plus Aug 2, 2023
76327b8
Remove debug log and count on multi_targets() debug
seiko2plus Aug 4, 2023
e13ce41
update multi_targets to reduce the number of objects
seiko2plus Aug 7, 2023
9509508
BLD: updates to build and test dependencies
rgommers Aug 10, 2023
371bb76
BLD: add Meson version check, to catch older installed versions early
rgommers Aug 10, 2023
bfb504f
CI: fix doc refguide check failure on CircleCI
rgommers Aug 10, 2023
34ec848
BLD: use numpy's friendly fork of meson-python
rgommers Aug 10, 2023
7a40779
DEV: vendor spin's meson.py, modified to use our vendored Meson
rgommers Aug 8, 2023
a594207
CI: fix Windows GHA jobs for vendored meson-python and spin
rgommers Aug 10, 2023
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
Prev Previous commit
Next Next commit
Provide compatibility with distutils
  Several renames have been made to certain compiler definitions
  that were used to determine the current target, as well as the macros
  in the dispatch configuration headers.

  These changes were necessary to allow for the modification of the prefix 'NPY_'
  in case this work is used outside of NumPy.
  • Loading branch information
seiko2plus authored and rgommers committed Aug 10, 2023
commit 9a139d3410130f00f6c44542982172b4295866f0
10 changes: 7 additions & 3 deletions numpy/core/src/_simd/_simd.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ PyMODINIT_FUNC PyInit__simd(void)
goto err; \
} \
}

NPY__CPU_DISPATCH_CALL(NPY_CPU_HAVE, ATTACH_MODULE, MAKE_MSVC_HAPPY)
NPY__CPU_DISPATCH_BASELINE_CALL(ATTACH_BASELINE_MODULE, MAKE_MSVC_HAPPY)
#ifdef NPY__CPU_MESON_BUILD
NPY_MTARGETS_CONF_DISPATCH(NPY_CPU_HAVE, ATTACH_MODULE, MAKE_MSVC_HAPPY)
NPY_MTARGETS_CONF_BASELINE(ATTACH_BASELINE_MODULE, MAKE_MSVC_HAPPY)
#else
NPY__CPU_DISPATCH_CALL(NPY_CPU_HAVE, ATTACH_MODULE, MAKE_MSVC_HAPPY)
NPY__CPU_DISPATCH_BASELINE_CALL(ATTACH_BASELINE_MODULE, MAKE_MSVC_HAPPY)
#endif
return m;
err:
Py_DECREF(m);
Expand Down
4 changes: 3 additions & 1 deletion numpy/core/src/_simd/_simd.dispatch.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,9 @@ NPY_CPU_DISPATCH_CURFX(simd_create_module)(void)
{
static struct PyModuleDef defs = {
.m_base = PyModuleDef_HEAD_INIT,
#ifdef NPY__CPU_TARGET_CURRENT
#if defined(NPY_MTARGETS_CURRENT) // meson build
.m_name = "numpy.core._simd." NPY_TOSTRING(NPY_MTARGETS_CURRENT),
#elif defined(NPY__CPU_TARGET_CURRENT)
.m_name = "numpy.core._simd." NPY_TOSTRING(NPY__CPU_TARGET_CURRENT),
#else
.m_name = "numpy.core._simd.baseline",
Expand Down
3 changes: 2 additions & 1 deletion numpy/core/src/common/npy_cpu_dispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#endif
#endif
#endif // !NPY_DISABLE_OPTIMIZATION
#ifndef NPY__CPU_MESON_BUILD
/**
* Macro NPY_CPU_DISPATCH_CURFX(NAME)
*
Expand Down Expand Up @@ -261,5 +262,5 @@
((TESTED_FEATURES) ? (NPY_CAT(NPY_CAT(LEFT, _), TARGET_NAME) __VA_ARGS__) : (void) 0),
#define NPY_CPU_DISPATCH_CALL_ALL_BASE_CB_(LEFT, ...) \
( LEFT __VA_ARGS__ )

#endif // NPY__CPU_MESON_BUILD
#endif // NUMPY_CORE_SRC_COMMON_NPY_CPU_DISPATCH_H_
0