Skip to content

Commit dc3a465

Browse files
committed
align OpenCL versions
1 parent d1151d5 commit dc3a465

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.ci/ci-images/manylinux_2_28_aarch64/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ chmod +x cmake.sh
3535
rm -f ./cmake.sh
3636

3737
# build PoCL
38+
#
39+
# NOTE: If this is updated, check if CL_TARGET_OPENCL_VERSION in cmake/IntegratedOpenCL.cmake
40+
# needs to be updated (see comments there fore links).
3841
git clone \
3942
--depth 1 \
4043
--branch v7.1 \

.github/workflows/ci-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
dockerfile: .ci/ci-images/manylinux_2_28_x86_64/Dockerfile
3737
# TODO(jameslamb): revert hard-coded tag before merging
3838
tag: ci-manylinux_2_28_x86_64-dev
39-
#tag: ci-manylinux_2_28_x86_64${{ inputs.tag-suffix }}
39+
# tag: ci-manylinux_2_28_x86_64${{ inputs.tag-suffix }}
4040
steps:
4141
- name: Checkout repository
4242
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

cmake/IntegratedOpenCL.cmake

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
# Build static libraries by default
12
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
3+
4+
# set dependency versions
25
set(BOOST_VERSION_DOT "1.74")
36
string(REPLACE "." "_" BOOST_VERSION_UNDERSCORE ${BOOST_VERSION_DOT})
47

@@ -49,7 +52,19 @@ if(NOT OpenCL-ICD-Loader_POPULATED)
4952
message(STATUS "Populated OpenCL ICD Loader")
5053
endif()
5154
list(APPEND INTEGRATED_OPENCL_INCLUDES ${OPENCL_ICD_LOADER_HEADERS_DIR})
52-
list(APPEND INTEGRATED_OPENCL_DEFINITIONS CL_TARGET_OPENCL_VERSION=120)
55+
56+
# lint_cmake: -linelength
57+
# CL_TARGET_OPENCL_VERSION should match whatever the version was with the OpenCL-Headers commit pulled above.
58+
# That should also be consistent with whatever version of PoCL is built in LightGBM's CI images.
59+
#
60+
# references:
61+
#
62+
# * https://github.com/KhronosGroup/OpenCL-Headers/blob/6137cfbbc7938cd43069d45c622022572fb87113/README.md?plain=1#L56-L71
63+
# * https://github.com/KhronosGroup/OpenCL-Headers/blob/6137cfbbc7938cd43069d45c622022572fb87113/CL/cl_version.h#L23
64+
# * https://github.com/pocl/pocl/blob/070b1081111d5f29bd8bd87fb8355866644fe8ea/CMakeLists.txt#L1572-L1573
65+
#
66+
# lint_cmake: +linelength
67+
list(APPEND INTEGRATED_OPENCL_DEFINITIONS CL_TARGET_OPENCL_VERSION=300)
5368
if(WIN32)
5469
list(
5570
APPEND

0 commit comments

Comments
 (0)