-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update SWIG version, cleaner setup and fix PoCL installation #34
Conversation
@@ -91,31 +92,34 @@ RUN git clone --depth 1 --branch v1.8 https://github.com/pocl/pocl.git \ | |||
-DENABLE_POCLCC=OFF \ | |||
-DENABLE_TESTS=OFF \ | |||
-DENABLE_EXAMPLES=OFF \ | |||
-DLLC_HOST_CPU=generic \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the following error:
#9 10.85 -- Find out LLC target triple (for host x86_64-unknown-linux-gnu)
#9 10.86 -- Find out LLC host CPU with /usr/local/bin/llc
#9 10.87 CMake Error at cmake/LLVM.cmake:721 (message):
#9 10.87 LLVM could not recognize your CPU model automatically. Please run CMake
#9 10.87 with -DLLC_HOST_CPU=<cpu> (you can find valid names with: llc -mcpu=help)
#9 10.87 Call Stack (most recent call first):
#9 10.87 CMakeLists.txt:472 (include)
#9 10.87
#9 10.87
#9 10.87 -- Configuring incomplete, errors occurred!
#9 10.87 See also "/pocl/build/CMakeFiles/CMakeOutput.log".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generic
results in Aborted (core dumped)
. x86-64
seems to be OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me based on the description at https://portablecl.org/docs/html/install.html
-DLLC_HOST_CPU=<something>
Defaults to auto-detection viallc
. Runllc -mcpu=help
for valid values. The CPU type is required to compile the “target” (kernel library) part of CPU backend.
This variable overrides LLVM’s autodetected host CPU at configure time. Useful when llc fails to detect the CPU (often happens on non-x86 platforms, or x86 with CPU newer than LLVM).
For as long as we are still using pocl 1.8 (microsoft/LightGBM#5596), LLVM is pinned to v11:
lightgbm-ci-docker/images/manylinux_2_28_x86_64/Dockerfile
Lines 17 to 23 in a0df140
# building clang | |
# | |
# [why v11.1.0?] | |
# | |
# - LightGBM is incompatible with libomp v12 and v13 (https://github.com/microsoft/LightGBM/issues/4229) | |
# - PoCL v1.8 requires LLVM+clang, but only supports v6-v13 (https://github.com/pocl/pocl/blob/3f420ef735672e439097d020db605778dbc4a6a1/cmake/LLVM.cmake#L209) | |
# - so v11.x is the latest version that will work with the these constraints, and v11.1.0 was the last release in the v11 series |
LLVM 11.1.0 came out in February 2021 (release history), so I guess it's possible that GitHub's hosted runners could have a newer CPU than that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the investigation!
|
Works fine!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, thank you!
Cross-reference: microsoft/LightGBM#6541.