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

3322 Optimize performance of the astype usage in arrays #3338

Merged
merged 16 commits into from
Nov 18, 2021

Conversation

Nic-Ma
Copy link
Contributor

@Nic-Ma Nic-Ma commented Nov 15, 2021

Fixes #3322 .

Description

This PR optimized many np.astype() operations to avoid copy.

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@Nic-Ma Nic-Ma mentioned this pull request Nov 15, 2021
Nic-Ma and others added 3 commits November 17, 2021 18:01
Signed-off-by: Nic Ma <nma@nvidia.com>
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 17, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 17, 2021

/build

@Nic-Ma Nic-Ma changed the title [WIP] 3322 Optimize performance of the astype usage in arrays 3322 Optimize performance of the astype usage in arrays Nov 17, 2021
@Nic-Ma Nic-Ma marked this pull request as ready for review November 17, 2021 11:20
@Nic-Ma Nic-Ma requested a review from wyli November 17, 2021 23:51
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

monai/transforms/utility/array.py Outdated Show resolved Hide resolved
monai/apps/deepedit/transforms.py Show resolved Hide resolved
Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

@Nic-Ma Nic-Ma enabled auto-merge (squash) November 18, 2021 13:45
Copy link
Contributor

@SachidanandAlle SachidanandAlle left a comment

Choose a reason for hiding this comment

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

LGTM for deepxx Transforms..

These ones are done over click points.. size of the array typically less than 20.. you might not notice big boost wrt optimization unless something similar done on full 3D label/image

Signed-off-by: Nic Ma <nma@nvidia.com>
@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/black

@Nic-Ma
Copy link
Contributor Author

Nic-Ma commented Nov 18, 2021

/build

@Nic-Ma Nic-Ma merged commit bf55246 into Project-MONAI:dev Nov 18, 2021
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.

LoadImageD performance
3 participants