Skip to content

Fix scheduler bug where it rounds to 0 divisions for a chunk. - #6760

Merged
sklam merged 4 commits into
numba:masterfrom
IntelLabs:issue6749
Mar 2, 2021
Merged

sklam merged 4 commits into
numba:masterfrom
IntelLabs:issue6749

Conversation

@DrTodd13

Copy link
Copy Markdown
Contributor

Resolves #6749

Comment thread numba/np/ufunc/gufunc_scheduler.cpp Outdated
Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
Comment thread numba/tests/test_parfors.py Outdated
@stuartarchibald stuartarchibald added Effort - short Short size effort needed 4 - Waiting on author Waiting for author to respond to review labels Mar 1, 2021
@stuartarchibald stuartarchibald added this to the Numba 0.54 RC milestone Mar 1, 2021
@stuartarchibald

Copy link
Copy Markdown
Contributor

Manually testing against the sample code in #6749... mainline does this:

num_dim = 6
ranges = ([0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 14], )
num_threads = 4
sched[0] = 1 0 1 0 1 0 1 0 -787390336 271947308 -463249520 271765979 
sched[1] = -769903936 -167047680 307827184 -463126000 0 316800560 -332696768 -787390336 317704688 272245250 0 317704688 
sched[2] = 0 0 -332320592 -770377632 -787390336 316800560 307827184 318603472 -787390336 272247143 -787390336 -463126000 
sched[3] = -770377632 318604000 -812855408 272305680 307819792 315285840 307819864 318603832 0 271783384 32 1241058768 

this patch does:

num_dim = 6
ranges = ([0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 14], )
num_threads = 4
sched[0] = 0 0 0 0 0 0 1 1 1 1 0 6
sched[1] = 0 0 0 0 1 0 1 1 1 1 1 6
sched[2] = 0 0 0 0 0 7 1 1 1 1 0 14
sched[3] = 0 0 0 0 1 7 1 1 1 1 1 14

which I think confirms it fixes the issue.

Co-authored-by: stuartarchibald <stuartarchibald@users.noreply.github.com>
@DrTodd13 DrTodd13 added 4 - Waiting on reviewer Waiting for reviewer to respond to author and removed 4 - Waiting on author Waiting for author to respond to review labels Mar 1, 2021

@stuartarchibald stuartarchibald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the patch!

@stuartarchibald stuartarchibald added 4 - Waiting on CI Review etc done, waiting for CI to finish 5 - Ready to merge Review and testing done, is ready to merge and removed 4 - Waiting on reviewer Waiting for reviewer to respond to author 4 - Waiting on CI Review etc done, waiting for CI to finish labels Mar 2, 2021
@sklam
sklam merged commit 00c15b7 into numba:master Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to merge Review and testing done, is ready to merge Effort - short Short size effort needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parallel accelerator yields incorrect results for high dimensional arrays

3 participants