Skip to content
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

Review sub devices #343

Merged
merged 3 commits into from
Apr 2, 2021
Merged

Review sub devices #343

merged 3 commits into from
Apr 2, 2021

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Mar 31, 2021

Closes #290

Changes were added atop commits in #326, and this PR superseded #326.

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as draft March 31, 2021 19:10
@oleksandr-pavlyk oleksandr-pavlyk mentioned this pull request Mar 31, 2021
@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review April 1, 2021 14:45
@oleksandr-pavlyk
Copy link
Collaborator Author

This supersedes #326 now to expedite merging of this work to master.

@1e-to @diptorupd @PokhodenkoSA

@diptorupd
Copy link
Contributor

This supersedes #326 now to expedite merging of this work to master.

@1e-to @diptorupd @PokhodenkoSA

@oleksandr-pavlyk @PokhodenkoSA @1e-to As-is this PR cannot be merged into master. It has work-in-progress commits with temporary commit messages that I will not merge into master. While we are still a very small beta library it can catch up soon. I want us to stick to something close to (if not as stringent as https://releases.llvm.org/8.0.1/docs/DeveloperPolicy.html#incremental-development). Thoughts?

@diptorupd
Copy link
Contributor

diptorupd commented Apr 1, 2021

As-is this PR cannot be merged into master.

I am making the comment after trying to and giving up on cleaning up using interactive rebase, doing such a rebase is a huge drag on my time.

This was referenced Apr 2, 2021
etotmeni and others added 3 commits April 2, 2021 08:58
1. Moved code for sub-devices to the end of class definition

   It was placed in the middle of initialization code block, separating
   `__cinit__` from `_init_*` routines it uses.

2. create_sub_devices requires use of keyword argument parition.
   Usage is d.create_sub_devices(partition=4)

3. Plugged possible memory leak in create_sub_devices_by_counts
   which memory allocated for array would not be freed if sub-devices
   vector was returned NULL

4. Changed signature of create_sub_device_by_counts from accepting object
   of type list, to accepting any object, which is checked to be Sized
   (len(obj) is expected to work), and Iterable, i.s. iteration of
   elements works

5. Changes to accept all integral types, such as np.int32, not just python int.

6. Got rid of _raise_create_sub_devices_exception function, and replaced
   it with explicit raise CreateSubDevicesError(message)

7. updated tests to use partition= keyword
@diptorupd
Copy link
Contributor

Thanks @oleksandr-pavlyk for an excellent display of git-fu.

@oleksandr-pavlyk
Copy link
Collaborator Author

As-is this PR cannot be merged into master.

I am making the comment after trying to and giving up on cleaning up using interactive rebase, doing such a rebase is a huge drag on my time.

We were able to squash all of @1e-to changes into two separate commits retaining her name as commit's author, one for C-API and one for Python part. My review changes were also squashed into a separate commit.

This should not been needed. If git branch is used to keep lots of WIP/backup snapshots, and the intent is to squash changes, or reorganize them in any other way, this should be done by the author before PR is opened for a review.

@oleksandr-pavlyk
Copy link
Collaborator Author

Good to go. Merging...

@oleksandr-pavlyk
Copy link
Collaborator Author

@diptorupd You need to approve, please.

@oleksandr-pavlyk oleksandr-pavlyk merged commit c9fd48b into master Apr 2, 2021
@oleksandr-pavlyk oleksandr-pavlyk deleted the review-sub-devices branch April 2, 2021 16:01
@diptorupd
Copy link
Contributor

Thanks @1e-to and @oleksandr-pavlyk

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.

Implement support for sub-devices
2 participants