From a3262441dda2ad13460506d7e5fdbe56aaa9fa9e Mon Sep 17 00:00:00 2001 From: Jonathan Giannuzzi Date: Mon, 13 Jun 2022 18:08:13 +0100 Subject: [PATCH] Build integrated OpenCL Linux wheel in CI --- .ci/setup.sh | 3 +++ .ci/test.sh | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci/setup.sh b/.ci/setup.sh index 5288bcd01249..472b19d59395 100755 --- a/.ci/setup.sh +++ b/.ci/setup.sh @@ -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 diff --git a/.ci/test.sh b/.ci/test.sh index c2f467ed20d6..2e5d75174462 100755 --- a/.ci/test.sh +++ b/.ci/test.sh @@ -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