Skip to content

GPU build fails for lightgbm target #2126

@StrikerRUS

Description

@StrikerRUS

Error message

[ 95%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/tree_learner.cpp.o
[ 96%] Linking CXX executable ../lightgbm
CMakeFiles/lightgbm.dir/src/treelearner/gpu_tree_learner.cpp.o: In function `boost::compute::command_queue::command_queue(boost::compute::context const&, boost::compute::device const&, unsigned long)':
/home/travis/build/Microsoft/LightGBM/src/treelearner/gpu_tree_learner.cpp:(.text._ZN5boost7compute13command_queueC2ERKNS0_7contextERKNS0_6deviceEm[_ZN5boost7compute13command_queueC2ERKNS0_7contextERKNS0_6deviceEm]+0xee): undefined reference to `clCreateCommandQueueWithProperties'
CMakeFiles/lightgbm.dir/src/treelearner/gpu_tree_learner.cpp.o: In function `boost::compute::kernel::set_arg_svm_ptr(unsigned long, void*)':
/home/travis/build/Microsoft/LightGBM/src/treelearner/gpu_tree_learner.cpp:(.text._ZN5boost7compute6kernel15set_arg_svm_ptrEmPv[_ZN5boost7compute6kernel15set_arg_svm_ptrEmPv]+0xb): undefined reference to `clSetKernelArgSVMPointer'
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../lightgbm] Error 1
make[1]: *** [CMakeFiles/lightgbm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/voting_parallel_tree_learner.cpp.o
[100%] Linking CXX shared library ../lib_lightgbm.so
[100%] Built target _lightgbm
make: *** [all] Error 2

Full logs:

Reproducible examples

Remove _lightgbm at this line:

https://github.com/Microsoft/LightGBM/blob/4be53a5a1f18892692138dfd3085190124bc1a3e/.ci/test.sh#L127

If we try to build all targets (_lightgbm and lightgbm), then GPU build fails with the same error as in #458 and #1047.

@huanzhang12 Do you have any ideas why it happens?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions