Skip to content

ENH: Convert unary from C universal intrinsics to C++ using Highway #19

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

Merged
merged 403 commits into from
Jul 21, 2025

Conversation

amane-ame
Copy link

No description provided.

rgommers and others added 30 commits May 18, 2025 16:00
MAINT: update NPY_FEATURE_VERSION after dropping python 3.10
The anaconda staging repositories have changed layout and now only
25 files are showing per page. This update uses a different URL to
grab all of the names, thus avoiding the need for paging.

There are also some cleanups and added comments to make future
maintenance easier.

[skip azp] [skip cirrus] [skip actions]
MAINT: Update download-wheels for multiple pages
We've been carrying a variant of this patch in our local copy of NumPy
for some time. The alloc cache reduces the effectiveness of
use-after-free or use-of-uninitialized memory warnings because caching
of allocations means they may be reused for a different allocation,
potentially hiding real problems.
A thin wrapper over Google's Highway SIMD library to simplify its interface.
This commit provides the implementation of that wrapper, consisting of:

- simd.hpp: Main header defining the SIMD namespaces and configuration
- simd.inc.hpp: Template header included multiple times with different namespaces

The wrapper eliminates Highway's class tags by:
- Using lane types directly which can be deduced from arguments
- Leveraging namespaces (np::simd and np::simd128) for different register widths

A README is included to guide usage and document design decisions.
  - Fix hardware/platform terminology in documentation for clarity
  - Add support for long double in template specializations
  - Add kMaxLanes constant to expose maximum vector width information
  - Follows clang formatting style for consistency with NumPy codebase.
  - Add anonymous namespace around implementation to ensure each
    translation unit gets its own constants based on local flags
  - Use HWY_LANES_CONSTEXPR for Lanes function to ensure proper
    constexpr evaluation across platforms
…size

  Replace hn::Lanes(f64) with hn::MaxLanes(f64) when defining the index array
  size to fix error C2131: "expression did not evaluate to a constant". This error
  occurs because Lanes() isn't always constexpr compatible, especially with
  scalable vector extensions. MaxLanes() provides a compile-time constant value
  suitable for static array allocation and should be used with non-scalable SIMD
  extensions when defining fixed-size arrays.
Rename Highway wrapper macros for clarity:
- NPY_SIMDX → NPY_HWY
- NPY_SIMDX_F16 → NPY_HWY_F16
- NPY_SIMDX_F64 → NPY_HWY_F64
- NPY_SIMDX_FMA → NPY_HWY_FMA

To avoids confusion with legacy SIMD macros.
Skip Highway's EMU128 in favor of NumPy's scalar implementations for
due to strict IEEE 754 floating-point compliance requirements
BUG: allclose does not warn for invalid value encountered in multiply or alternativly checks for validity of tolerances
…64-idiv

TYP: allow inplace division of ``NDArray[timedelta64]`` by floats
ENH: Disable the alloc cache under address and memory sanitizers
Bumps [larsoner/circleci-artifacts-redirector-action](https://github.com/larsoner/circleci-artifacts-redirector-action) from 1.0.0 to 1.1.0.
- [Release notes](https://github.com/larsoner/circleci-artifacts-redirector-action/releases)
- [Commits](scientific-python/circleci-artifacts-redirector-action@4e13a10...7eafdb6)

---
updated-dependencies:
- dependency-name: larsoner/circleci-artifacts-redirector-action
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…arsoner/circleci-artifacts-redirector-action-1.1.0

MAINT: Bump larsoner/circleci-artifacts-redirector-action from 1.0.0 to 1.1.0
- Create 2.4.0-notes.rst
- Update release.rst
- Update pavement.py
- Update pyproject.toml
- Update cversions.txt
- Update numpyconfig.h
- Delete release fragments
BEG, MAINT: Begin NumPy 2.4.0 development.
mattip and others added 27 commits June 29, 2025 21:19
DOC: Document assertion comparison behavior between scalar and empty array
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
BUG: Fix version check in blas_utils.c
MAINT: Enable linting with ruff E501
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.1 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@39edc49...181d5ee)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This seems generally confusing. I would like to make it keyword only,
but this already gives a warning when loading _very_ old pickles, meaning
I am not quite sure we should change away from a warning quickly.

We should fix things around pickling and start pickling in a way that
makes it easier to move to keyword only arguments.  (I suppose one could
detect the case of `np.dtype(obj, False, True)` and assume it is via
unpickling, but...

I am assuming that it is OK to (eventually) break unpickling these 10+ year
old files, but I am not in a rush to actually do so and go through with
the deprecation.

Signed-off-by: Sebastian Berg <sebastianb@nvidia.com>
* MAINT: Enforce ruff E501

* fix merge
…onzero`, simplify `MaskedArray.nonzero` return type (numpy#29303)
DOCS: Remove incorrect "Returns" section from `MaskedArray.sort`
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Fix incorrect grammar in TypeError message for ufunc argument count mismatch
DEP: Give a visible warning when `align=` to dtype is a non-bool
@amane-ame amane-ame changed the title Plct unary ENH: Convert unary from C universal intrinsics to C++ using Highway Jul 3, 2025
@joy2myself joy2myself merged commit 3f5dccf into plctlab:upstream-highway Jul 21, 2025
2 of 3 checks passed
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.