Skip to content

Add LightGBM OpenMP conflict fix script - #5

Merged
vectorsss merged 1 commit into
masterfrom
fix/lightgbm-openmp
Jun 23, 2026
Merged

vectorsss merged 1 commit into
masterfrom
fix/lightgbm-openmp

Conversation

@vectorsss

@vectorsss vectorsss commented Jun 23, 2026 •

Copy link
Copy Markdown
Owner

Adds fix_lightgbm_openmp.sh: a macOS-only helper that makes the conda LightGBM dylib resolve libomp from the active conda environment instead of an external copy (e.g. Homebrew).

Some LightGBM builds leak an absolute rpath (e.g. /opt/homebrew/opt/libomp/lib) that outranks the env's own libomp, so LightGBM and numpy/scikit-learn end up loading two OpenMP runtimes in one process. With OMP_WAIT_POLICY=active both busy-wait and oversubscribe cores, making many-tiny-fit workloads (e.g. retrain-mode Shapley benchmarks) up to ~20x slower.

The script removes any out-of-env absolute LC_RPATH that contains a libomp*.dylib and re-signs the binary ad-hoc. Idempotent and safe to re-run.

@vectorsss
vectorsss merged commit 0228dd3 into master Jun 23, 2026
3 checks passed
@vectorsss
vectorsss deleted the fix/lightgbm-openmp branch June 23, 2026 20:38
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.

1 participant