-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
GPU support? Or not for this project #6439
Comments
It's unlikely that statsmodels can easily run on GPU. We make very heavy use of scipy, and as far as I know that doesn't run on GPU. I guess, the most difficult part is that the tsa.statespace models use the BLAS/LAPACK wrappers that scipy provides directly in cython. |
With 200K lines of code, statsmodels is also pretty big. The other point is that I'm not sure where a GPU would help us. (I never worked on a CPU, the one time I tried I didn't manage to get it to install/work.) |
I see. I will take a look. |
I think putting an interface for linalg calls to abstract scipy and GPU operations can work in some models. There is also the issue of sending small jobs to GPU that will cause a communication overhead. |
IMO if one had a compelling case for GPU, then numba would be the way to go. In most cases the GPU would only be needed for a small fraction of the code. |
A while ago I looked at dask-ml https://github.com/dask/dask-ml In our case, estimation runs usually into memory problems before we get to long computation times. MKL and other linalg libraries uses multiple cores, but often that's not efficient. The only cases where we use explicit multiprocessing inside statsmodels is where we use obviously parallel code, e.g. in bootstrap and maybe for cross-validation (AFAIR). In those cases we need the entire model available in the sub processes and not just small pieces of code. For numba speed-up we can just optimize a single function in the center of a model or a stats function. There are likely just a few usecases inside statsmodels where GPU might help. (with the caveat that I don't know much about use cases for GPU) |
I haven't taken a look at the architecture of statsmodels, but I will be interested in integrating GPU support and have a backend that runs in a systems prog language. A good idea for this project or more like this needs to be a completely new project? Just did not find any other opensource econometrics libs, wanted to improve it.
The text was updated successfully, but these errors were encountered: