Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
8d69f05
MAINT: Refactor buffered loop to do an initial setup
seberg Nov 28, 2024
7d19f2d
TST: Fixup tests to pass (for now not correct)
seberg Nov 30, 2024
809cf0c
BUG: Avoid a coresize of 0
seberg Dec 2, 2024
9302b30
TST: The nullpointer doesn't print uniformly accross platforms
seberg Dec 2, 2024
54d967f
BUG: Add missing pointer dereference
seberg Dec 2, 2024
87ad5a2
BUG: Fix coreoffset mechanism and unset buf-reuse on different (parti…
seberg Dec 2, 2024
67cddf7
TST: Forgot one more nditer debug_print() fixup
seberg Dec 2, 2024
facd237
Apply suggestions from code review
seberg Dec 2, 2024
22f335c
MAINT: Remove bufnever logic from allocate-arrays (we do it later any…
seberg Dec 2, 2024
ac282fc
MAINT: Rename to BUF_SINGLESTRIDE and use the new gap in the flags
seberg Dec 2, 2024
6ed3b99
MAINT: Remove unnecessary fixed-stride logic
seberg Dec 3, 2024
162a951
MAINT: Fill in correct buffer transferstride always
seberg Dec 3, 2024
0cc37b9
MAINT: Don't use static zero (initialize by caller instead)
seberg Dec 3, 2024
786e546
DOC: Improve the function documentation somewhat.
seberg Dec 3, 2024
d09be24
BUG: Fix typo in new assert
seberg Dec 3, 2024
92ecbaf
MAINT: Reinstante the CONTIG flag (as buggy as it was)
seberg Dec 5, 2024
5bad357
remove debug print (was this part of the sanitizer problem?!)
seberg Dec 5, 2024
67cb5c5
TST: See if deleting a, b makes santizer tests pass
seberg Dec 6, 2024
5508cc5
MAINT: Move buffersize init (new code always limits it to itersize)
seberg Dec 10, 2024
be6749d
DOC: Explain buffer-setup cost more (maybe should rethink it...)
seberg Dec 12, 2024
426934d
DOC: Expand/change iteration explanation based on Marten's review
seberg Dec 15, 2024
1836fd1
MAINT: More review comments (mostly code clarifications/simplifications)
seberg Dec 15, 2024
e758983
MAINT: Smaller changes based on review
seberg Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: Fixup tests to pass (for now not correct)
  • Loading branch information
seberg committed Dec 2, 2024
commit 7d19f2dcbd8bb6fe51a448f2f96ba4fbfd74ad0a
3 changes: 2 additions & 1 deletion numpy/_core/tests/test_einsum.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_array_equal, assert_almost_equal,
assert_raises, suppress_warnings, assert_raises_regex, assert_allclose
assert_raises, suppress_warnings, assert_raises_regex, assert_allclose,
assert_array_almost_equal_nulp
)

# Setup for optimize einsum
Expand Down
17 changes: 9 additions & 8 deletions numpy/_core/tests/test_nditer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2681,8 +2681,8 @@ def test_iter_buffering_reduction():
it = np.nditer([p, None],
['delay_bufalloc', 'reduce_ok', 'buffered', 'external_loop'],
[['readonly'], ['readwrite', 'allocate']],
op_axes=[[-1, 0], [-1, -1]],
itershape=(2, 2))
op_axes=[[-1, 0], [1, 0]],
itershape=(2, 2), op_dtypes=["float64", "int64"])
with it:
it.operands[1].fill(0)
it.reset()
Expand Down Expand Up @@ -3296,7 +3296,7 @@ def test_debug_print(capfd):
expected = """
------ BEGIN ITERATOR DUMP ------
| Iterator Address:
| ItFlags: BUFFER REDUCE REUSE_REDUCE_LOOPS
| ItFlags: BUFFER REDUCE
| NDim: 2
| NOp: 2
| IterSize: 50
Expand All @@ -3321,18 +3321,19 @@ def test_debug_print(capfd):
| BufferData:
| BufferSize: 50
| Size: 5
| BufIterEnd: 5
| BufIterEnd: 50
| REDUCE Pos: 0
| REDUCE OuterSize: 10
| REDUCE OuterDim: 1
| BUFFER CoreSize: 5
| BUFFER Reduce outersize: 10
| BUFFER OuterDim: 1
Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose the reduce outersize is actually also always valid now. Which would be useful for advancing the iterator.
Should rename/reorganize, but would add churn elsewhere too probably.

| Strides: 8 4
| Ptrs:
| REDUCE Outer Strides: 40 0
| REDUCE Outer Ptrs:
| ReadTransferFn:
| ReadTransferData:
| ReadTransferData: 0x0 0x0
| WriteTransferFn:
| WriteTransferData:
| WriteTransferData: 0x0 0x0
| Buffers:
|
| AxisData[0]:
Expand Down