You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interpolants we in `Interpolations.jl` are described by two arrays:
the knots and the coeffs. When `Adapt` is called on these interpolants,
CuArrays are allocated on the GPU. For large data, this is inefficient.
In this commit, I add a system to avoid these allocations. This is
accomplished by add a dictionary to `InterpolationsRegridder`. This
dictionary has keys that identify the size of the knots and coefficients
and values the adapted splines. When `regrid` is called, we check if we
have already allocated some suitable space in this dictionary, if not,
we create a new spline, if we do, we write in place.
This removes GPU allocations in the hot path (ie, the regridder is used
in a time evolution with always the same data and dimensions), while
also keeping the flexibility of reusing the same regridder with any
input data.
0 commit comments