-
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 Clang support #1523
Comments
I'm not aware of the exact minimum version, but here is some empirical choice: |
@chivee Sorry, probably I was unclear, but I wanted to know about the general possibility of compiling these LightGBM versions with AppleClang and its required version for doing this. |
Maybe it's overkill, but what about providing several Python wheels with different versions? For instance, |
To speak about |
Hi @huanzhang12 ! Don't you know what https://github.com/Microsoft/LightGBM/tree/gpu-apple (base branch is The error appears even after adding OpenCL headers from Khronos too. https://stackoverflow.com/a/23079478 This file cannot be placed into system directory due to SIP on new macOS, so I made the following: https://github.com/Microsoft/LightGBM/blob/9bdc0f45966024f136d4f4d881d7993041d82296/.travis/test.sh#L84-L87 |
ping @huanzhang12 |
Apple's OpenCL implementation on CPU only supports a (1,1,1) workgroup size (in other words, 1 serial thread). Most practical OpenCL program uses a few hundreds work items in each work group (in LightGBM, this is 256). This is Apple's implementation issue and cannot be easily fixed. This is a known issue: In other words, we cannot test the GPU code on macOS in travis (building should be fine). |
Thank you very much, @huanzhang12 ! As usual, detailed answer :-) Shame on me that I've missed #667. To speak about the issue title, are there any special requirements for Apple Clang/CMake/Boost version? In general, I think it's good to write several words in the installation guide about macOS building process of the GPU version. Did I get it right that built-in Apple's OpenCL works fine in case of real GPU device? And does Khronos headers are needed in this case? |
If it compiles on macOS, it should be able to run on real GPU devices. I don't think Khronos headers help if the compilation already works without it. However, I have no macOS system to test Apple OpenCL build. More tests should be done to draw a final conclusion. |
@huanzhang12 Thanks! Got it! I agree that no instruction is better than misleading one. |
Default compiler for macOS is now Apple Clang (#1727 (comment)). All other unresolved issues mentioned here have their own GitHub issues. So, closing this. |
Since we've started to support Apple Clang in #1501, we should clarify installation instructions with the notes about the possibility of compiling certain versions of LightGBM with Apple Clang.
For ordinary version we have the requirement
CMake >=3.12
because ofFindOpenMP
. And what about?
ping @guolinke @chivee @levyfan @huanzhang12 @ebernhardson @henry0312
The text was updated successfully, but these errors were encountered: