Skip to content

ndimage: implement higher order spline interpolation - #4402

Merged
mergify[bot] merged 6 commits into
cupy:masterfrom
grlee77:ndimage_spline_interp
Dec 28, 2020
Merged

mergify[bot] merged 6 commits into
cupy:masterfrom
grlee77:ndimage_spline_interp

Conversation

@grlee77

@grlee77 grlee77 commented Dec 4, 2020

Copy link
Copy Markdown
Member

closes #1523

blocked by #4400 and #4401

Overview

This PR implements spline interpolation orders 2-5. Spline interpolation was substantially improved in SciPy 1.6, with all boundary modes now being handled correctly. Only the mode='mirror' cases can be compared tested against older SciPy.

To decide: How do we want to handle the order argument to these functions. Should we change the default back from None to 3 so that it matches SciPy? For now, I have left it as it was in CuPy 8.0.

Performance

I will post some benchmark results when I get a chance. This is still fast relative to SciPy, but the acceleration is worse than that seen for orders 0 and 1. I would like to see if there is a way to refactor this a bit to reduce register usage, as I suspect that is part of the reason for the performance difference.

@kmaehashi kmaehashi added blocking Issue/pull-request is mandatory for the upcoming release cat:enhancement Improvements to existing features prio:medium st:blocked-by-another-pr Blocked by another pull-request and removed blocking Issue/pull-request is mandatory for the upcoming release labels Dec 4, 2020
@grlee77
grlee77 force-pushed the ndimage_spline_interp branch from 37daab9 to e10b2a8 Compare December 10, 2020 03:11
@grlee77
grlee77 force-pushed the ndimage_spline_interp branch from 5e99fd9 to 19d2850 Compare December 21, 2020 04:59
@grlee77
grlee77 force-pushed the ndimage_spline_interp branch from 19d2850 to b5aa409 Compare December 21, 2020 09:12
@takagi takagi removed the st:blocked-by-another-pr Blocked by another pull-request label Dec 22, 2020
@takagi takagi added this to the v9.0.0b1 milestone Dec 22, 2020
@takagi

takagi commented Dec 22, 2020

Copy link
Copy Markdown
Contributor

Thanks! As for the default value of order, yes, it should be changed to align with SciPy. I put no-compat label.

@takagi takagi added the no-compat Disrupts backward compatibility label Dec 22, 2020
@takagi

takagi commented Dec 22, 2020

Copy link
Copy Markdown
Contributor

pfnCI, test this please.

@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit b5aa409, target branch master) failed with status FAILURE.

@grlee77

grlee77 commented Dec 22, 2020

Copy link
Copy Markdown
Member Author

I have changed the default order to 3 as in SciPy and updated the docstrings accordingly.

Please try running the tests again (I fixed a missing argument that was due to a rebasing mistake). All interpolation tests are passing locally.

@asi1024 asi1024 modified the milestones: v9.0.0b1, v9.0.0b2 Dec 24, 2020
@takagi

takagi commented Dec 28, 2020

Copy link
Copy Markdown
Contributor

pfnCI, test this please.

@takagi

takagi commented Dec 28, 2020

Copy link
Copy Markdown
Contributor

Thanks! Waiting for CI pass and will be merged soon.

@takagi takagi added the st:test-and-merge (deprecated) Ready to merge after test pass. label Dec 28, 2020
@chainer-ci

Copy link
Copy Markdown
Member

Jenkins CI test (for commit 8309690, target branch master) succeeded!

@mergify
mergify Bot merged commit 49f3d48 into cupy:master Dec 28, 2020
@kmaehashi kmaehashi removed the no-compat Disrupts backward compatibility label Jan 28, 2021
@asi1024 asi1024 added cat:numpy-compat Follow the NumPy/SciPy spec changes no-compat Disrupts backward compatibility labels Jan 28, 2021
@kmaehashi kmaehashi removed cat:enhancement Improvements to existing features no-compat Disrupts backward compatibility labels Jan 28, 2021
@the-lay the-lay mentioned this pull request May 3, 2021
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:numpy-compat Follow the NumPy/SciPy spec changes prio:medium st:test-and-merge (deprecated) Ready to merge after test pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Higher order interpolation modes in future (v5.0) map_coordinates function

5 participants