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
Remove debug log and count on multi_targets() debug
  This simplifies the implementation and improves code readability.
  • Loading branch information
seiko2plus authored and rgommers committed Aug 10, 2023
commit 76327b8db7ee93688c796936bf6d425406ea09c7
1 change: 0 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,3 @@ endif

subdir('meson_cpu')
subdir('numpy')
subdir('meson_cpu/debug')
43 changes: 0 additions & 43 deletions meson_cpu/debug/meson.build

This file was deleted.

6 changes: 0 additions & 6 deletions meson_cpu/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
#
# - `CPU_FEATURES`: A dictionary containing all supported CPU feature objects.
#
# - `CPU_MTARGETS_DEBUG`: Initializes an empty dictionary required by the debug script.
# This dictionary should hold the first element of the returned list
# from `mod_features.multi_targets()` as the value,
# where the key is the configuration file name.
#
# Additionally, this script exposes a set of variables that represent each supported feature
# to be used within the Meson function `mod_features.multi_targets()`.

Expand Down Expand Up @@ -304,4 +299,3 @@ CPU Optimiztion Options
CPU_CONF_DISPATCH, ' '.join(CPU_DISPATCH_NAMES)
)
)
CPU_MTARGETS_DEBUG = {}
22 changes: 7 additions & 15 deletions numpy/core/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ py.extension_module('_multiarray_tests',
subdir: 'numpy/core',
)

mtargets_res = mod_features.multi_targets(
_umath_tests_mtargets = mod_features.multi_targets(
'_umath_tests.dispatch.h',
'src/umath/_umath_tests.dispatch.c',
dispatch: [
Expand All @@ -700,14 +700,13 @@ mtargets_res = mod_features.multi_targets(
prefix: 'NPY_',
dependencies: [py_dep, np_core_dep]
)
CPU_MTARGETS_DEBUG += {'_umath_tests.dispatch.h': mtargets_res[0]}

test_modules_src = [
['_umath_tests', [
src_file.process('src/umath/_umath_tests.c.src'),
'src/common/npy_cpu_features.c',
],
mtargets_res[1]
_umath_tests_mtargets
],
['_rational_tests', 'src/umath/_rational_tests.c', []],
['_struct_ufunc_tests', 'src/umath/_struct_ufunc_tests.c', []],
Expand Down Expand Up @@ -744,7 +743,7 @@ foreach gen_mtargets : [
]
],
]
mtargets_res = mod_features.multi_targets(
multiarray_umath_dispatch_link += mod_features.multi_targets(
gen_mtargets[0], multiarray_gen_headers + gen_mtargets[1],
dispatch: gen_mtargets[2],
baseline: CPU_BASELINE,
Expand All @@ -760,8 +759,6 @@ mtargets_res = mod_features.multi_targets(
'src/umath'
]
)
CPU_MTARGETS_DEBUG += {gen_mtargets[0]: mtargets_res[0]}
multiarray_umath_dispatch_link += mtargets_res[1]
endforeach

# Build npysort dispatch-able sources
Expand All @@ -778,7 +775,7 @@ foreach gen_mtargets : [
[AVX512_SPR, AVX512_ICL]
],
]
mtargets_res = mod_features.multi_targets(
multiarray_umath_dispatch_link += mod_features.multi_targets(
gen_mtargets[0], multiarray_gen_headers + gen_mtargets[1],
dispatch: gen_mtargets[2],
# baseline: CPU_BASELINE, it doesn't provide baseline fallback
Expand All @@ -794,8 +791,6 @@ mtargets_res = mod_features.multi_targets(
'src/umath'
]
)
CPU_MTARGETS_DEBUG += {gen_mtargets[0]: mtargets_res[0]}
multiarray_umath_dispatch_link += mtargets_res[1]
endforeach

# Build umath dispatch-able sources
Expand Down Expand Up @@ -950,7 +945,7 @@ foreach gen_mtargets : [
]
],
]
mtargets_res = mod_features.multi_targets(
multiarray_umath_dispatch_link += mod_features.multi_targets(
gen_mtargets[0], umath_gen_headers + gen_mtargets[1],
dispatch: gen_mtargets[2],
baseline: CPU_BASELINE,
Expand All @@ -966,8 +961,6 @@ mtargets_res = mod_features.multi_targets(
'src/umath'
]
)
CPU_MTARGETS_DEBUG += {gen_mtargets[0]: mtargets_res[0]}
multiarray_umath_dispatch_link += mtargets_res[1]
endforeach

# Build _multiarray_umath module
Expand Down Expand Up @@ -1167,7 +1160,7 @@ foreach target : get_option('test-simd')
_simd_dispatch += [mfeatures]
endforeach

mtargets_res = mod_features.multi_targets(
_simd_mtargets = mod_features.multi_targets(
'_simd.dispatch.h',
[
src_file.process('src/_simd/_simd_inc.h.src'),
Expand All @@ -1186,7 +1179,6 @@ mtargets_res = mod_features.multi_targets(
c_args: c_args_common,
cpp_args: cpp_args_common,
)
CPU_MTARGETS_DEBUG += {'_simd.dispatch.h': mtargets_res[0]}

py.extension_module('_simd',
[
Expand All @@ -1196,7 +1188,7 @@ py.extension_module('_simd',
c_args: c_args_common,
include_directories: ['src/_simd', 'src/npymath'],
dependencies: np_core_dep,
link_with: mtargets_res[1] + npymath_lib,
link_with: [_simd_mtargets] + npymath_lib,
install: true,
subdir: 'numpy/core',
)
Expand Down
0