-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
OpenCL & Multicore Support #2423
base: main
Are you sure you want to change the base?
Conversation
Added configurable openCL/multicore CPU vars when building the model. Requires changes to cmdstanpy to work.
Hi @StoffAudioLLC! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, remove the donation button!
README.md
Outdated
# Prophet: Automatic Forecasting Procedure | ||
|
||
# Prophet: Automatic Forecasting Procedure With python OPENCL/Multi-Core options | ||
[![Donate with PayPal](https://raw.githubusercontent.com/stefan-niedermann/paypal-donate-button/master/paypal-donate-button.png)](https://www.paypal.com/donate?hosted_button_id=9ELH753DDE98Y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove it.
import platform | ||
from pathlib import Path | ||
from shutil import copy, copytree, rmtree | ||
from typing import List | ||
|
||
import cmdstanpy.utils as utils | ||
print(utils.cmdstan_path()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove path info
removed button
I created a new virtual environment in ubuntu20 and Python 3.8.10 I confirmed that Prophet 1.1.2 version was installed in my virtual environment without an error message. After making all conditions, including the dataset, as identical as possible, I measured the usage of each Core/Thread used by Prophet and how much time spent on computation was reduced. However, disappointingly, multi-core was not used and the computation time was almost the same. Did I make a mistake? Does there seem to be a problem with my environment?
|
Thanks for checking it out! As of now, only a few functions in Stan utilize opencl and multithreading. So this can create a faster execution time, but will not run the whole model on multiple cores. I made a version that did just that, but the execution time was way worse as it had to copy the data into memory multiple times. I also made a version that runs 10x faster and uses cuda (30/40 series cards) for some of the functions that do not use opencl. Check it out: https://github.com/StoffAudioLLC/CuProphet |
I edited the python setup.py to add the option to compile with OpenCL and/or Multicore Support for faster runtimes.
My dataframe (226x26000) ran 2x as fast on OpenCL vs single core version.
In order to run this model properly, changes to CMDSTANPY must be made which I will be making a fork and pull request for soon.
Feel free to reach out if I can be any help: [email protected]