Skip to content

make better split between wrappers and torch implementations #52

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 20 commits into from
Feb 21, 2023

Conversation

ev-br
Copy link
Collaborator

@ev-br ev-br commented Feb 11, 2023

Working towards moving actual logic to _detail, so that top level modules (currently, _wrappers.py, _ndarray.py) unwrap/normalize their inputs and pass heavy lifting to _detail. Details of organization of the _detail submodules are TBD, and so are details of unwrapping/normalization or arguments. This PR is to only to make the split as clean as reasonable.

@ev-br ev-br force-pushed the infer-full-dtype-followup branch 2 times, most recently from 8f1b501 to 89a8d54 Compare February 13, 2023 17:14
@ev-br ev-br force-pushed the move_to_impl branch 6 times, most recently from 963fb8c to e304cc6 Compare February 14, 2023 19:34
Base automatically changed from infer-full-dtype-followup to main February 16, 2023 10:16
@ev-br ev-br force-pushed the move_to_impl branch 2 times, most recently from 707f4a4 to f2ff966 Compare February 17, 2023 09:28
@ev-br ev-br changed the title WIP: make better split between wrappers and torch implementations make better split between wrappers and torch implementations Feb 17, 2023
@ev-br ev-br requested a review from lezcano February 17, 2023 11:47
@ev-br
Copy link
Collaborator Author

ev-br commented Feb 17, 2023

This is no longer WIP, this is large enough. Nothing exciting here, this is pure MAINT PR, which sets the ground for a future work on communications between array_like user API and pytorch implementations.

Copy link
Collaborator

@lezcano lezcano left a comment

Choose a reason for hiding this comment

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

Now that the implementations are much cleaner, I went on and re-reviewed the implementations of the functions.

Now, this starts to look much better! The implementationos in implementations.py are much cleaner and easier to understand, and then the ugly and repetitive preprocessing lives in _wrapper.py.

@ev-br ev-br force-pushed the move_to_impl branch 2 times, most recently from 5ec1278 to fabf01f Compare February 17, 2023 16:44
@ev-br ev-br force-pushed the move_to_impl branch 2 times, most recently from 13e5277 to 6970fd3 Compare February 17, 2023 19:27
Copy link
Collaborator

@lezcano lezcano left a comment

Choose a reason for hiding this comment

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

Good stuff! This is certainly a great step in the right direction.

@ev-br ev-br merged commit 8a91f0a into main Feb 21, 2023
@ev-br
Copy link
Collaborator Author

ev-br commented Feb 21, 2023

Thanks Mario for the review.

@ev-br ev-br deleted the move_to_impl branch February 21, 2023 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants