-
Couldn't load subscription status.
- Fork 226
WIP: static libraries handling #3253
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
Draft
Alexandr-Solovev
wants to merge
4
commits into
uxlfoundation:rfcs
Choose a base branch
from
Alexandr-Solovev:dev/asolovev_rfcs_proposal
base: rfcs
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Static libraries handling Update(RFC) | ||
|
|
||
| ### Revision | ||
| |Date |Revision| Comments | | ||
| |-----------|--------|--------------------------------------------------------------------------| | ||
| | 20250612 | 1.0 | Initial version | | ||
|
|
||
| ## Motivation | ||
|
|
||
| * What problem do we solve? | ||
| * **Significant reduction in library size**: | ||
| Removing symbol copying for static libraries will reduce the size of the oneDAL standalone package by approximately: | ||
| - ~50% (~700 MB) on Linux | ||
| - ~X% (~X GB) on Windows (TBD) | ||
| * **Cleaner and more maintainable build system**: | ||
| Simplifies both Bazel and CMake logic by removing fragile `addlib`-style manual bundling. | ||
|
|
||
| * What is the customer impact if we don't do this? | ||
| * Users may face issues with dependencies handling. | ||
|
|
||
| * What operations systems will be impacted? | ||
| * We will have the same approach for both windows and linux systems. | ||
|
|
||
| * What is the timeline? | ||
| * **Deprecation notice**: oneDAL 2025.7 release notes | ||
| * **Symbol copying removal**: oneDAL 2026.0 | ||
|
|
||
| ## Initial Results of Proposed Changes | ||
|
|
||
| ## Introduction | ||
|
|
||
| Currently, in the oneDAL build process, mathematical backends such as **OpenBLAS** for ARM and **Intel MKL** are linked by **copying all symbols** from the corresponding static libraries (e.g., `libopenblas.a`, `libmkl_core.a`) into the resulting archive via custom `addlib` logic in the `Makefile`. | ||
|
|
||
| This approach leads to bundling large static libraries into our own library archives, increasing binary size and leading to symbol duplication or conflicts if the final application also links to the same libraries. | ||
|
|
||
| ## Proposal | ||
|
|
||
| We propose to change the structure of static library handling in oneDAL to address several growing concerns: | ||
|
|
||
| 1. **Remove symbol duplication and overbundling**: | ||
| Eliminate the current `addlib` logic that embeds all symbols from backend libraries (e.g., MKL/OpenBLAS) directly into the oneDAL static archives. | ||
| Instead, treat these libraries as **link-time dependencies** only — through `target_link_libraries()` in CMake or `EXTRA_LIBS` in Makefile — shifting responsibility for final linkage to the user. | ||
| This avoids binary bloat, reduces symbol conflicts, and simplifies maintenance. | ||
|
|
||
| ## Open Questions | ||
|
|
||
| - How will this change impact current downstream consumers who rely on bundled behavior? | ||
| - Should we maintain backward compatibility (e.g., via a CMake switch)? | ||
| - Should we provide guidance or tooling for users to configure correct BLAS/LAPACK backend linkage? | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree on this point, rather than providing backward compatibility it’s better to provide documentation on how to link. |
||
|
|
||
| ## oneDAL PR | ||
|
|
||
| https://github.com/uxlfoundation/oneDAL/pull/3237 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Examples needed here. Which particular issues would users face?
It would be good to provide the link lines "before" and "after" for some particular configuration, Linux + oneMKL, for example.