Skip to content

Make Split a view op #344

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 1 commit into from
Jun 15, 2023
Merged

Conversation

ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Jun 15, 2023

Closes #343

Originally I was forcing a copy in the Numba implementation, but it makes more sense to make the Split Op a view on the inputs.

The C implementation does not exploit this, but we could if we wanted. Because of this, C graphs may become a bit more inefficient because they can no longer inplace on the outputs of Split even if these are always copies for now.

@ricardoV94 ricardoV94 added the bug Something isn't working label Jun 15, 2023
@ricardoV94 ricardoV94 requested a review from aseyboldt June 15, 2023 10:05
@ricardoV94 ricardoV94 changed the title Copy outputs in numba impl of Split Copy outputs in numba implementation of Split Jun 15, 2023
@ricardoV94 ricardoV94 marked this pull request as draft June 15, 2023 10:14
@ricardoV94 ricardoV94 changed the title Copy outputs in numba implementation of Split Make Split a view op Jun 15, 2023
@ricardoV94 ricardoV94 added enhancement New feature or request and removed enhancement New feature or request labels Jun 15, 2023
This allows the outputs to be views of the inputs. The Python and Numba implementation do that, but the C still performs a copy
@ricardoV94 ricardoV94 marked this pull request as ready for review June 15, 2023 11:53
Copy link
Member

@aseyboldt aseyboldt left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the quick fix and the writeup :-)

@ricardoV94 ricardoV94 merged commit f4536c3 into pymc-devs:main Jun 15, 2023
@ricardoV94 ricardoV94 deleted the fix_split_numba branch June 20, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working numba
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Split Op returns view in Numba backend
2 participants