Skip to content

lightgbm: restore the workflow and use static OpenMP schedules - #615

Merged
luhenry merged 1 commit into
mainfrom
lightgbm-restore
Aug 27, 2026
Merged

lightgbm: restore the workflow and use static OpenMP schedules#615
luhenry merged 1 commit into
mainfrom
lightgbm-restore

Conversation

@luhenry

@luhenry luhenry commented Aug 27, 2026

Copy link
Copy Markdown
Member

#481 merged while a temporary probe was still in the workflow: build-lightgbm.yml on main carries an omp_probe job and an if: github.run_id == '0' guard that switches python_sdist, build_wheels and publish off, so it currently builds nothing. This removes both, and adds the patch the probe turned out to be needed.

Differs from upstream

  • OpenMP dynamic and guided schedules replaced with static — see below.

Patches

libgomp's dynamic and guided work-share schedules fault on the runners. A 40-line C program that allocates nothing in the loop body segfaults 3/3 under schedule(guided) and schedule(dynamic), on the bare runner (GCC 13.3.0) and inside manylinux_2_39_riscv64 (GCC 14.3.1); schedule(static) and 30M concurrent malloc/free per thread are clean, and the same binaries pass under QEMU riscv64 and on aarch64 at 64 threads. Details in #617. Only 13 of LightGBM's ~230 parallel regions ask for dynamic or guided; the rest already use static. The cost is load balancing on ranking queries and feature groups. Revert when the runners' toolchain is fixed.

Full suite on aarch64, patched and unpatched: 822 passed, 260 skipped, 12 xfailed, 4 xpassed.

#481 merged with a temporary probe job still in place: an omp_probe job
that compiles a standalone OpenMP program, and an 'if: github.run_id ==
"0"' guard that switched the sdist, wheel and publish jobs off. Remove
both so the workflow builds again.

The probe was investigating the riscv64 segfault in the ranking tests.
It found that libgomp's dynamic and guided work-share schedules fault on
the runner for a 40-line C program with no LightGBM in it, under both
GCC 13 and GCC 14; schedule(static) and 30M concurrent mallocs per
thread are clean. That is tracked separately.
@luhenry
luhenry merged commit 4a65e59 into main Aug 27, 2026
4 of 5 checks passed
@luhenry
luhenry deleted the lightgbm-restore branch August 27, 2026 15:20
@luhenry luhenry changed the title lightgbm: drop the diagnostic scaffolding from build-lightgbm.yml lightgbm: restore the workflow and use static OpenMP schedules Aug 27, 2026
@luhenry luhenry linked an issue Aug 27, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lightgbm riscv64 support

1 participant