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

Numba Compatability #35

Open
frigusgulo opened this issue Apr 28, 2020 · 1 comment
Open

Numba Compatability #35

frigusgulo opened this issue Apr 28, 2020 · 1 comment
Labels

Comments

@frigusgulo
Copy link

I noticed in the source code for DirectionalVariogram.py that the @jit decorators have been commented out. Are there any immediate plans to accommodate GPU use with gstat?

@mmaelicke
Copy link
Owner

Hey,

Yes, the jit decorator is all over the place and numba is also a dependency for a few versions now. Mainly, because I am using it in the skgstat.estimators module to speed calculations of Variograms with large input data sets up, at the cost of a bit overhead on small samples.

I am not really sure if that is a good idea though. I am running into issues while developing with these jitted functions all the time and it sometimes really slows me down in development. On the other hand, it's working most of the time. Also, I am not sure if all jit's are placed in meaningful places. To do that correctly, I need to build a benchmarking framework for the unittests and see, where a jit can really speed things up. I.e.:

in _direction_mask; line 490
there I think it might be really useful, but I couldn't manage to make it work with the shapely objects.

in local_reference_system; line 432
I don't think that jit would make any difference as this is not as slow as expected and the numpy usage is fairly fast here.

The last point to consider is that there a more ways to get parts of the code compiled. Cython, for example, is just another very popular solution. I also have a lot of old Fortran code here and thought that maybe I can incorporate that somehow.

So to answer your question, I am not planning to implement more numba usage on the short term, but mainly because of lack of time. So if you want / need that, we can surely discuss how and where to implement which solution and how to do it in a systematic way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants