Skip to content

Fix erroneous array count in parallel gufunc kernel generation. - #8081

Merged
sklam merged 2 commits into
numba:mainfrom
stuartarchibald:fix/parallel_py_off_by_1
Jun 7, 2022
Merged

sklam merged 2 commits into
numba:mainfrom
stuartarchibald:fix/parallel_py_off_by_1

Conversation

@stuartarchibald

Copy link
Copy Markdown
Contributor

As title.

@stuartarchibald

Copy link
Copy Markdown
Contributor Author

Observation: The code path for ufunc and gufunc both run through the code changed in the diff, I think the +1 to the array count is only needed in the case of a ufunc. Next thing to try is branching on types.none return type to skip adding the 1.

@stuartarchibald

Copy link
Copy Markdown
Contributor Author

xref reproducer: #8032 (comment)
xref debug: #8032 (comment)

@stuartarchibald stuartarchibald added this to the Numba 0.56 RC milestone May 23, 2022
@stuartarchibald
stuartarchibald marked this pull request as ready for review May 23, 2022 09:11
@stuartarchibald
stuartarchibald requested review from esc and sklam as code owners May 23, 2022 09:11
@sklam sklam self-assigned this Jun 1, 2022

@sklam sklam left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make sense, and existing code already cover testing it.

Without this patch, an extra slot would be allocated when the type signature has a "void" return (output array declared).

@sklam sklam added 5 - Ready to merge Review and testing done, is ready to merge and removed 3 - Ready for Review labels Jun 7, 2022
@sklam
sklam merged commit 710a152 into numba:main Jun 7, 2022
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.

2 participants