flatironinstitute / jax-finufft

JAX bindings to the Flatiron Institute Non-uniform Fast Fourier Transform (FINUFFT) library
Apache License 2.0
77 stars 2 forks source link

Update the upstream version of finufft #107

Closed dfm closed 3 days ago

lgarrison commented 2 weeks ago

I think we probably want to compile the static library with -fPIC? I.e. target_compile_options(-fPIC PRIVATE finufft) in our CMake. Maybe using a finufft shared library instead would be better for codes that use both finufft and jax-finufft, but that's probably a corner case and requires care with rpath and auditwheel.

lgarrison commented 1 week ago

It looks like we need to set the POSITION_INDEPENDENT_CODE CMake property on (1) the finufft libs and (2) their dependencies. I don't know of an elegant way to set this on (2), so for now I'm just doing it explicitly. This probably means we should ask the finufft folks to add a FINUFFT_POSITION_INDEPENDENT_CODE flag.

In any case, this seems to have pushed the MacOS error to a missing FFTW dep. Maybe we need an explicit FFTW dependency in our CMake? Not sure why Ubuntu would work in that case, maybe because it's installing the headers in system paths?

lgarrison commented 5 days ago

finufft 2.3 is out! I updated the vendored dependency here, and things look good. Ready to merge?

dfm commented 3 days ago

Thanks!!