Skip to content

Commit

Permalink
Build integrated OpenCL Linux wheel in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi committed Jun 13, 2022
1 parent 3f6373d commit a326244
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ else # Linux
sudo apt-get install --no-install-recommends -y \
libboost1.74-dev \
ocl-icd-opencl-dev
fi
if [[ $TASK == "gpu" || $TASK == "bdist" ]] && [[ $(uname -m) == "x86_64" ]]; then
sudo apt-get update
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo apt-get install --no-install-recommends -y \
pocl-opencl-icd
Expand Down
4 changes: 3 additions & 1 deletion .ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ elif [[ $TASK == "bdist" ]]; then
ARCH=$(uname -m)
if [[ $ARCH == "x86_64" ]]; then
PLATFORM="manylinux1_x86_64"
# Make sure we can do both CPU and GPU; see tests/python_package_test/test_dual.py
export LIGHTGBM_TEST_DUAL_CPU_GPU=1
else
PLATFORM="manylinux2014_$ARCH"
fi
cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --plat-name=$PLATFORM --python-tag py3 || exit -1
cd $BUILD_DIRECTORY/python-package && python setup.py bdist_wheel --integrated-opencl --plat-name=$PLATFORM --python-tag py3 || exit -1
if [[ $PRODUCES_ARTIFACTS == "true" ]]; then
cp dist/lightgbm-$LGB_VER-py3-none-$PLATFORM.whl $BUILD_ARTIFACTSTAGINGDIRECTORY
fi
Expand Down

0 comments on commit a326244

Please sign in to comment.