Skip to content

Always convert input to C-order in distance_transform_edt - #7675

Merged
KumoLiu merged 6 commits into
Project-MONAI:devfrom
KumoLiu:distance_transform_edt
Apr 23, 2024
Merged

Always convert input to C-order in distance_transform_edt#7675
KumoLiu merged 6 commits into
Project-MONAI:devfrom
KumoLiu:distance_transform_edt

Conversation

@KumoLiu

@KumoLiu KumoLiu commented Apr 19, 2024

Copy link
Copy Markdown
Contributor

Fixes #7660

indices_ may not always be a shallow copy for F-order input as it constantly converts to C-order

indices_ = convert_to_cupy(indices)

data = cp.ascontiguousarray(data)

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 --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

KumoLiu added 2 commits April 19, 2024 13:44
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>

@Nic-Ma Nic-Ma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.
Please ensure the performance of related transforms is not affected.

Thanks.

Comment thread monai/transforms/utils.py Outdated
KumoLiu added 4 commits April 22, 2024 21:48
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
…tance_transform_edt

Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
@KumoLiu

KumoLiu commented Apr 22, 2024

Copy link
Copy Markdown
Contributor Author

/build

@KumoLiu
KumoLiu enabled auto-merge (squash) April 22, 2024 15:48
@KumoLiu
KumoLiu merged commit ac9b186 into Project-MONAI:dev Apr 23, 2024
@KumoLiu
KumoLiu deleted the distance_transform_edt branch April 23, 2024 01:28
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.

distance_transform_edt not always working with cuCIM backend

3 participants