Skip to content

Move build system to meson-python - #166

Open
ndgrigorian wants to merge 65 commits into
mainfrom
build-with-meson
Open

Move build system to meson-python#166
ndgrigorian wants to merge 65 commits into
mainfrom
build-with-meson

Conversation

@ndgrigorian

@ndgrigorian ndgrigorian commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

This PR proposes moving from scikit-build to meson-python as the mkl_umath build system

meson-python is already used by NumPy and eliminates the need for CMake, while also allowing setup.py to be removed (with its logic moved into the meson.build script)

Following the approach in NumPy, vendored/process_src_template.py is vendored from NumPy to be called from the build script, automating the processing of conv_template.py

This PR also adds building and testing with standard clang

Build option also changes:
The former CMake build options are now exposed as meson options and passed via -Csetup-args:
OPTIMIZATION_REPORT becomes -Csetup-args=-Dopt_report=true
MKL_THREADING becomes -Csetup-args=-Dmkl_threading=<layer>

@ndgrigorian
ndgrigorian force-pushed the build-with-meson branch 2 times, most recently from 1434bc2 to 5e8ef5a Compare March 4, 2026 11:09
@ndgrigorian
ndgrigorian force-pushed the build-with-meson branch 17 times, most recently from 5c09809 to b469c01 Compare March 5, 2026 07:29
@ndgrigorian
ndgrigorian marked this pull request as ready for review March 5, 2026 08:01
Base automatically changed from add-pre-commit to main March 5, 2026 15:29
An error occurred while trying to automatically change base from add-pre-commit to main March 5, 2026 15:29
Comment thread README.md
Comment thread meson.build
Comment thread meson.build Outdated
Comment thread pyproject.toml Outdated
Comment thread .github/workflows/build-with-standard-clang.yml Outdated
Comment thread CMakeLists.txt
Comment thread mkl_umath/generate_umath.py Outdated
Comment thread README.md
Comment thread conda-recipe/meta.yaml
Comment thread conda-recipe/meta.yaml
Comment thread .github/workflows/build-with-clang.yml
Comment thread .github/copilot-instructions.md Outdated
Comment thread AGENTS.md
Comment thread meson.build Outdated
Comment thread pyproject.toml Outdated
Comment thread meson.build Outdated
Comment thread conda-recipe/meta.yaml
Comment thread conda-recipe/meta.yaml
Comment thread conda-recipe-cf/build.sh Outdated
Comment thread conda-recipe-cf/build.sh Outdated
# Perform regular install
${PYTHON} setup.py install "${SKBUILD_ARGS[@]}"
fi
$PYTHON -m pip install --no-build-isolation --no-deps -Csetup-args="-Dmkl_threading=gnu_thread" .

@antonwolfy antonwolfy Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that intended to move from Intel compiler to GCC in cf workflows?
Looking into PR where we proposed to add mkl_umath to the cf feedstock, we still used Intel compiler there.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were discussing it in general, but it may be best to do it separately after we confirm that it introduces no performance regressions

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have restored the Intel compiler as it was before
I agree with @ndgrigorian that GCC switch should be done separately because with Intel compiler we pass optimization flags -fveclib=SVML, -fimf-precision=high, -fvectorize so we need to check performance regressions first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants