-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
distance_transform_edt not always working with cuCIM backend #7660
Comments
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Hi @aaronkujawa, thanks for the reporting. I have created a PR to fix it. MONAI/monai/transforms/utils.py Line 2209 in ffd4454
MONAI/monai/utils/type_conversion.py Line 262 in ffd4454
|
Hi @KumoLiu , thanks for the quick fix! |
Fixes #7660 `indices_` may not always be a shallow copy for F-order input as it constantly converts to C-order https://github.com/Project-MONAI/MONAI/blob/ffd4454b576abd4eaae30b364f41c213e30dca4c/monai/transforms/utils.py#L2209 https://github.com/Project-MONAI/MONAI/blob/ffd4454b576abd4eaae30b364f41c213e30dca4c/monai/utils/type_conversion.py#L262 ### Types of changes <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] 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. --------- Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
Describe the bug
The distance_transform_edt returns all zero in special cases when cuCIM is installed and used as a backend.
This happens when convert_to_cupy() decides that the data array needs to be copied here:
To Reproduce
Expected behavior
Results should be the same, but the second output is all zero.
The text was updated successfully, but these errors were encountered: