-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: Configurable allocator #17582
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
ENH: Configurable allocator #17582
Changes from 1 commit
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
55f2f6c
ENH: add and use global configurable memory routines
mattip 23da73e
ENH: add tests and a way to compile c-extensions from tests
mattip 94b9f25
fix allocation/free exposed by tests
mattip 81b45fd
DOC: document the new APIs (and some old ones too)
mattip fc32c2f
BUG: return void from FREE, also some cleanup
mattip de22327
MAINT: changes from review
mattip 38274a4
fixes from linter
mattip 59b520a
setting ndarray->descr on 0d or scalars mess with FREE
mattip 5264019
make scalar allocation more consistent wrt np_alloc_cache
mattip 7c396d7
change formatting for sphinx
mattip de9001c
remove memcpy variants
mattip 9e7c3ed
update to match NEP 49
mattip 953cc88
ENH: add a python-level get_handler_name
mattip ad9329b
ENH: add core.multiarray.get_handler_name
mattip 6d10fdb
Allow closure-like definition of the data mem routines
eliaskoromilas 18bea05
Fix incompatible pointer warnings
eliaskoromilas 4368023
Note PyDataMemAllocator and PyMemAllocatorEx differentiation
eliaskoromilas d243313
Redefine default allocator handling
eliaskoromilas c9b6854
Always allocate new arrays using the current_handler
eliaskoromilas a8fd378
Search for the mem_handler name of the data owner
eliaskoromilas a17565b
Sub-comparisons don't need a local mem_handler
eliaskoromilas 2ec5912
Make the default_handler a valid PyDataMem_Handler
eliaskoromilas 227c4b8
Fix PyDataMem_SetHandler description (NEP discussion)
eliaskoromilas fb8135d
Pass the allocators by reference
eliaskoromilas 7291484
Implement allocator context-locality
eliaskoromilas c7a9c22
Fix documentation, make PyDataMem_GetHandler return const
eliaskoromilas 99f8250
remove import of setuptools==49.1.3, doesn't work on python3.10
mattip b43c1fe
Fix refcount leaks
eliaskoromilas a7a5435
fix function signatures in test
mattip e3723df
Return early on PyDataMem_GetHandler error (VOID_compare)
eliaskoromilas 144acc6
Add context/thread-locality tests, allow testing custom policies
eliaskoromilas 8539f5f
Merge branch 'configurable_allocator' into configurable_allocator
eliaskoromilas 6ab00d0
ENH: add and use global configurable memory routines
mattip e7e8754
ENH: add tests and a way to compile c-extensions from tests
mattip 5f08532
fix allocation/free exposed by tests
mattip 7266029
DOC: document the new APIs (and some old ones too)
mattip 5d547ff
BUG: return void from FREE, also some cleanup
mattip 4617c50
MAINT: changes from review
mattip 8f739c4
fixes from linter
mattip 90205b6
setting ndarray->descr on 0d or scalars mess with FREE
mattip 5c0d3f9
make scalar allocation more consistent wrt np_alloc_cache
mattip 3b385d9
change formatting for sphinx
mattip e6e12a3
remove memcpy variants
mattip 048552d
update to match NEP 49
mattip ad6f8ad
ENH: add a python-level get_handler_name
mattip 50f8b93
ENH: add core.multiarray.get_handler_name
mattip c7438f5
Allow closure-like definition of the data mem routines
eliaskoromilas f823ba4
Fix incompatible pointer warnings
eliaskoromilas ad13161
Note PyDataMemAllocator and PyMemAllocatorEx differentiation
eliaskoromilas 0a08acd
Redefine default allocator handling
eliaskoromilas 1f0301d
Always allocate new arrays using the current_handler
eliaskoromilas 3d56aa0
Search for the mem_handler name of the data owner
eliaskoromilas 8ea6818
Sub-comparisons don't need a local mem_handler
eliaskoromilas fb2af4d
Make the default_handler a valid PyDataMem_Handler
eliaskoromilas f05a1c6
Fix PyDataMem_SetHandler description (NEP discussion)
eliaskoromilas 660e0a4
Pass the allocators by reference
eliaskoromilas a4f8d71
remove import of setuptools==49.1.3, doesn't work on python3.10
mattip d7b1a1d
fix function signatures in test
mattip ab1a0eb
try to fix cygwin extension building
mattip b92e36c
YAPF mem_policy test
eliaskoromilas 76cda3a
Merge branch 'configurable_allocator' into configurable_allocator
eliaskoromilas 3eadf2f
Less empty lines, more comments (tests)
eliaskoromilas dbe9d73
Apply suggestions from code review (set an exception and)
eliaskoromilas 1bfb870
Merge pull request #57 from eliaskoromilas/configurable_allocator
mattip 0511820
skip test on cygwin
mattip 23c4bc0
update API hash for changed signature
mattip ed8649b
TST: add gc.collect to make sure cycles are broken
mattip 9aacefa
Implement thread-locality for PyPy
eliaskoromilas 79712fa
Update numpy/core/tests/test_mem_policy.py
mattip a2ae4c0
fixes from review
mattip 09b9c0d
update circleci config
mattip efb3c77
fix test
mattip 2945c64
make the connection between OWNDATA and having a allocator handle mor…
mattip 3a97d9a
improve docstring, fix flake8 for tests
mattip 1df805c
update PyDataMem_GetHandler() from review
mattip ef607bd
Implement allocator lifetime management
eliaskoromilas 8bdc9a1
Merge pull request #59 from eliaskoromilas/configurable_allocator
mattip a3256e5
update NEP and add best-effort handling of error in PyDataMem_UserFREE
mattip 4d6ea65
merge main into branch
mattip 5941d7c
merge main into branch
mattip 522c368
Merge branch 'main' into configurable_allocator
mattip 442b0e1
ENH: fix and test for blindly taking ownership of data
mattip 8ca8b54
Update doc/neps/nep-0049.rst
seberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update numpy/core/tests/test_mem_policy.py
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
- Loading branch information
There are no files selected for viewing
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
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.
Uh oh!
There was an error while loading. Please reload this page.