-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Apple M1 chip compilation support #4369
Comments
Hey @fayeshine ! Do you have logs of failed compilation on Apple M1? Also, Homebrew provides LightGBM bottles for |
@StrikerRUS Hi, I found that the python wheels for arm64 is for linux, do we have arm64 wheel for mac? |
Unfortunately, we don't. |
@StrikerRUS homebew's arm64 version is a command line program, not a python package, so could we provide a arm64 wheel for mac? Or could you tell me how to compile with arm64 instruction set on mac, it seems that cmake automatically compile into an intel version. |
My example with Homebrew was about possibility of compilation on ARM platform. Unfortunately, we can't provide wheels right now due to infrastructure limitations. We are looking forward for mac M1 availability on free CI services (e.g. actions/runner-images#2187 (comment)).
What makes you think so? Please share the logs here. Also, I believe it worth using the latest CMake. |
According to this article, you can simply download LightGBM from conda-forge.
|
@StrikerRUS thank you! this link solved my problem. I tested that arm64 version is about 12% faster than x86 version, my train set is about 1000000*1000, num_iteration=10. |
Very glad you've solved the problem!
Are you referring the article about XGBoost and LightGBM installation? |
@StrikerRUS, Yes, I reffered to the article about xgboost and lightgbm installation, this mini-conda package is all compiled in arm64, as well as the lgb package, I know this because it runs in APPLE mode in activity monitor. As for your question: Because I can see it runs in INTEL mode in activity monitor of mac, there's no bug during the compilation, so I don't have useful logs. Maybe I need to pass '-DCMAKE_OSX_ARCHITECTURES=arm64' to force cmake compile in arm64 version, but the mini-conda's package works just fine. |
Thanks a lot the detailed answer! |
This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
We can only compile LGB by x86 instruction set now, however apple m1 has much higher performance with ARM instruction set. If we use x86 version, the mac with M1 will run in a intel compatible mode (need compile translation) and the performance is much lower. So I suggest we support mac M1's ARM instruction set.
The text was updated successfully, but these errors were encountered: