Repository navigation
Conversation
mattip
force-pushed
the
indexed-loopos
branch
from
February 5, 2023 17:54
ed2e7ac to
3802b16
Compare
Owner
Author
|
Closing in favor of the PR opened on numpy/numpy |
mattip
pushed a commit
that referenced
this pull request
Nov 15, 2023
Merge in ~STEPAN.SINDELAR_ORACLE.COM/numpy-hpy from mq/GR-40889 to labs-hpy-port * commit '23216016a53c3788a1f4b7284ca1fa030dd1587b': address comments address comments hacky bug fix (revert me) bug fix bug fixes and hpy abort clean up port PyArray_GenericReduceFunction to HPy bug fix use free instead of PyMem_Free clean up port PyArray_EnsureXXArray to HPy missing PyArray_PyXXXAbstractDType initializations HPyArray_MaskedStridedUnaryOp require hpy ctx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ArrayMethodObject"indexed"to theUfuncclass innumpy/core/code_generators/generate_umath.pywhich will generate C code to add the loops. It usesget_info_no_castto find the correctArrayMethodObjectin theufunc._loopinfo list.try_trivial_at_loopinto the logic ofufunc_atto call the new loops.The good news is that
ufunc_atcan be up to 6.5x faster (via the benchmark added in numpy#22889). The bad news is that other benchmarks got slower. I am not sure why. Maybe the added field made the ufunc too big?Benchmarks vs. main