-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT,ENH: Reorganize buffered iteration setup #27883
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
Changes from 1 commit
8d69f05
7d19f2d
809cf0c
9302b30
54d967f
87ad5a2
67cddf7
facd237
22f335c
ac282fc
6ed3b99
162a951
0cc37b9
786e546
d09be24
92ecbaf
5bad357
67cb5c5
5508cc5
be6749d
426934d
1836fd1
e758983
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2018,7 +2018,6 @@ npyiter_find_buffering_setup(NpyIter *iter) | |
/* | ||
* Once a reduce operand reaches a ==0/!=0 stride flip, this dimension | ||
* becomes the outer reduce dimension. | ||
* We may continue growing, but only if strides align for any such operand. | ||
*/ | ||
int outer_reduce_dim = 0; | ||
|
||
|
@@ -2051,10 +2050,7 @@ npyiter_find_buffering_setup(NpyIter *iter) | |
for (iop = 0; iop < nop; iop++) { | ||
/* Check that we set things up nicely (if shape is ever 1) */ | ||
assert((axisdata->shape == 1) ? (prev_strides[iop] == strides[iop]) : 1); | ||
/* | ||
* Best case: the strides collaps for this operand, all fine. | ||
* Keep track at which single-stride or outer dims we are. | ||
*/ | ||
/* Best case: the strides collapse for this operand. */ | ||
if (prev_strides[iop] * prev_shape == strides[iop]) { | ||
if (op_single_stride_dims[iop] == idim) { | ||
op_single_stride_dims[iop] += 1; | ||
|
@@ -2095,7 +2091,7 @@ npyiter_find_buffering_setup(NpyIter *iter) | |
assert(!op_reduce_outer_dim[iop] || op_reduce_outer_dim[iop] == outer_reduce_dim); | ||
} | ||
if (iop != nop) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How can this be hit? I don't see a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just forgot to delete this. The first version I had broke immediately on finding a reduce op. But I wanted the info for all operands, so now it's breaking later. |
||
/* Including this dimension is invalid due to a reduction. */ | ||
/* Including this dimension was invalid due to a reduction. */ | ||
break; | ||
} | ||
|
||
|
@@ -2282,12 +2278,6 @@ npyiter_find_buffering_setup(NpyIter *iter) | |
best_size = best_coresize * (maximum_size / best_coresize); | ||
} | ||
} | ||
/* | ||
* Set the buffersize to either the: | ||
* - the largest we amount trivially iterate (no buffering!). | ||
* - the largest multiple of the coresize that is smaller than the | ||
* requested/default buffersize. | ||
*/ | ||
NIT_BUFFERDATA(iter)->buffersize = best_size; | ||
/* Core size is 0 (unless the user applies a range explicitly). */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. type? "Core starts at 0 (unless..." |
||
NIT_BUFFERDATA(iter)->coreoffset = 0; | ||
|
Uh oh!
There was an error while loading. Please reload this page.