-
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
add gpu test on osx #667
add gpu test on osx #667
Conversation
@guolinke @huanzhang12 all the test case fail with error |
@wxchan On OSX, for the CPU target, Apple's OpenCL implementation only supports a trivial work group size of [1,1,1]. The GPU kernels in LightGBM requires a work group size of [1,1,256], thus it is impossible to run them on the CPU target using Apple's OpenCL. Apple has no intention to fix this. One possible way to automatically test the GPU code is to install pocl on OSX, as suggested here: |
@wxchan any plan to fix this ? |
@guolinke didn't figure out how to fix it yet. The same procedure works on my mac. |
@wxchan On a real Mac, OpenCL can run on a real GPU (intel/nvidia), so it works. But in travisCI, there is no real GPU; only the CPU OpenCL device can be used. Apple's default OpenCL CPU driver is very limited and is not compatible with the GPU code. You can try to install pocl (an open source OpenCL implementation for CPU device) on your Mac and see if that works. If it works, you can try to put it into travis. |
@huanzhang12 thanks for explanation. Do you know how to use installed pocl instead of origin OpenCL? It still uses default |
@wxchan I have no idea on how it works on OSX. However I think in general we should link lightgbm against the newly compiled pocl instead of system OpenCL, and probably set up environment variable like |
I don't have much time working on this recently. Close it for now. I think it's a little complex to use pocl, it requires installing several dependencies. The total test time is often over 20 mins before running test cases. |
#658