Repository navigation
ENH: Port numpy.random extension modules to the Limited API and update limited_api to 3.13 - #32112
Conversation
|
These look fine to me as far as the impact on |
rgommers
left a comment
There was a problem hiding this comment.
Thanks @prathamhole14. Call overhead of 8-19% and no impact for large array operations is what I'd expect, and seems perfectly acceptable.
Undoing the usage of PyMem_RawMalloc & co. doesn't look like a good idea to me, that impacts performance and use of profilers. If those functions were added to the Limited API in 3.13, then I suggest to just target 3.13 as the minimum Python version when targeting the Stable ABI. We're only 5 months off from dropping 3.12 anyway, and there's no real downside there.
1e36204 to
65ee6c3
Compare
|
Hi Ralf, thank you for the review! yes I agree with your suggestion and it also makes changes cleaner. Although I am pushing what you asked for I am open to revert back if required. Thanks |
…for Limited API compliance
65ee6c3 to
c3802ce
Compare
numpy.random extension modules to the Limited API and update limited_api to 3.13
rgommers
left a comment
There was a problem hiding this comment.
Looks much better to me now, thanks!
|
@rgommers I think you might need to approve to clear the merge block |
rgommers
left a comment
There was a problem hiding this comment.
LGTM now, thanks @prathamhole14 and reviewers
numpy.random was ported to the Limited API in numpygh-32112, after this branch was created; the check is bidirectional, so those nine modules have to be listed here.
PR summary
As titled, see comments for explanation.
Darft since I want to confirm if CI is okay with this, Will share benchmark soon.
Benchmarks: https://gist.github.com/prathamhole14/31a7b0d1b0a76b73cad028ab6a508446
Related to: #31913
AI Disclosure
For comments and some research.