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

finufft/cufinufft interface rationalization (Python) #256

Closed
janden opened this issue Mar 17, 2023 · 1 comment
Closed

finufft/cufinufft interface rationalization (Python) #256

janden opened this issue Mar 17, 2023 · 1 comment

Comments

@janden
Copy link
Collaborator

janden commented Mar 17, 2023

Similar to #255, we need to align the interfaces for finufft and cufinufft in Python.

init

Plan.__init__(nufft_type, n_modes_or_dim, n_trans=1, eps=1e-06, isign=None, dtype='complex128', **kwargs)
cufinufft.__init__(nufft_type, modes, n_trans=1, eps=1e-06, isign=None, dtype=numpy.float32, **kwargs)

These are quite similar, but we'll need to figure out what our convention is for dtypes (should it be the real or complex or should we accept both). Here I think it makes sense for cufinufft to default to single precision even though finufft defaults to double precision. This should be more in line with what one would expect for CPU/GPU codes, but I'm open to suggestions here.

setpts

Plan.setpts(x=None, y=None, z=None, s=None, t=None, u=None)
cufinufft.set_pts(kx, ky=None, kz=None)

Obviously the name needs to change. (set_pts to setpts) but perhaps also the argument names. Should think about extending the interface to handle type 3 even if it's not implemented yet.

execute

Plan.execute(data, out=None)
cufinufft.execute(c, fk)

These behave quite differently in that data is always input for finufft, but for cufinufft either c or fk can be input (the other is output) depending on the type. Ideally, we should also allow the user to return an array.

Finally, we should consider renaming the cufinufft class to Plan similar to the finufft case.

@janden
Copy link
Collaborator Author

janden commented Jul 12, 2023

Closed by #290.

@janden janden closed this as completed Aug 31, 2023
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

No branches or pull requests

1 participant