Skip to content

Update dependency uxlfoundation/oneTBB#3606

Open
Alexandr-Solovev wants to merge 8 commits intouxlfoundation:mainfrom
Alexandr-Solovev:dev/asolovev_tbb_upd
Open

Update dependency uxlfoundation/oneTBB#3606
Alexandr-Solovev wants to merge 8 commits intouxlfoundation:mainfrom
Alexandr-Solovev:dev/asolovev_tbb_upd

Conversation

@Alexandr-Solovev
Copy link
Copy Markdown
Contributor

@Alexandr-Solovev Alexandr-Solovev commented Apr 13, 2026

Description

Summary

This PR updates the TBB integration and cleans up outdated configuration across the build system.

Changes

1. Removed legacy TBB layout variables

  • Removed obsolete TBB layout-related variables from the Makefile

2. Updated TBB to the latest version

  • Upgraded TBB across the project to the latest available release

3. Updated Bazel mapping

  • Adjusted Bazel configuration to correctly map the new TBB layout

Notes

  • The new TBB version uses a different library layout (e.g., versioned .so files), which is now handled in the build system
  • These changes align all build systems (Make/Bazel) with the same TBB version and structure

Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.
  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.
  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.

@Alexandr-Solovev Alexandr-Solovev added the dependencies Pull requests that update a dependency file label Apr 14, 2026
@Alexandr-Solovev Alexandr-Solovev marked this pull request as ready for review April 14, 2026 06:06
Copilot AI review requested due to automatic review settings April 14, 2026 06:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates oneTBB integration across the repository’s build tooling (Make, Bazel, CI) and removes legacy handling for the old oneTBB directory layout, aiming to standardize on the newer lib/-based structure.

Changes:

  • Removed old TBB layout detection/mapping logic from Make and Bazel configuration.
  • Bumped oneTBB version references (scripts and CI) to v2022.3.0.
  • Adjusted TBB download/unpack behavior to flatten older layouts into the new layout when needed.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
samples/daal/cpp/mpi/makefile_lnx Drops legacy lib/intel64/gcc4.8 handling and uses $(TBBROOT)/lib.
makefile Removes OLD_TBB_LAYOUT branching and simplifies TBB path selection logic.
dev/download_tbb.sh Updates oneTBB version and adds a compatibility flatten step for older extracted layouts.
dev/bazel/repos.bzl Removes hardcoded local-root mapping selection logic for older package keywords.
dev/bazel/deps/tbb.bzl Removes TBB local_mapping that supported older layouts.
.ci/pipeline/ci.yml Updates CI variable TBB_VERSION to v2022.3.0.
.ci/env/tbb.sh Adds an apt --fix-broken install step during environment setup.
Comments suppressed due to low confidence (1)

dev/bazel/repos.bzl:158

  • With the current logic, when root_env_var is set, mapping is always {} and repo_ctx.attr._local_mapping is never consulted. Since local_mapping is still part of prebuilt_libs_repo_rule() and _local_mapping is still declared as an attr, this is now dead configuration and can confuse future dependency updates. Either wire mapping = repo_ctx.attr._local_mapping back in for local roots (if still needed), or remove the local_mapping parameter/attr entirely to match the new behavior.
def _prebuilt_libs_repo_impl(repo_ctx):
    root = repo_ctx.os.environ.get(repo_ctx.attr.root_env_var)
    if root:
            mapping = {}
    else:
        if repo_ctx.attr.url or repo_ctx.attr.urls:
            root = _download(repo_ctx)
            mapping = repo_ctx.attr._download_mapping

Comment thread makefile
RELEASEDIR.tbb.libia := $(RELEASEDIR.tbb)/lib$(if $(OS_is_mac),,/$(_IA)$(if $(OS_is_win),/vc_mt,/$(TBBDIR.libia.lnx.gcc)))
RELEASEDIR.tbb.soia := $(if $(OS_is_win),$(RELEASEDIR.tbb)/redist/$(_IA)/vc_mt,$(RELEASEDIR.tbb.libia))
endif
RELEASEDIR.tbb.libia := $(RELEASEDIR.tbb)/lib$(if $(OS_is_mac),,$(if $(OS_is_win),/vc_mt,/$(TBBDIR.libia.lnx.gcc)))
Comment thread dev/bazel/repos.bzl
elif "2021.2-gold_236" in root:
mapping = repo_ctx.attr._local_mapping
else:
mapping = {}
Comment thread .ci/env/tbb.sh
Comment on lines 118 to 120
sudo apt-get update
sudo apt --fix-broken install -y
sudo apt-get install build-essential gcc gfortran cmake -y
Comment thread .ci/env/tbb.sh Outdated
tbb_prefix=${tbb_prefix:-${ONEDAL_DIR}/__deps/tbb-$target_arch}

sudo apt-get update
sudo apt --fix-broken install -y
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Alexandr-Solovev What kind of error does this aim to solve? Do you have a log?

Copy link
Copy Markdown
Contributor Author

@Alexandr-Solovev Alexandr-Solovev Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In building tbb step:

Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
build-essential is already the newest version (12.9ubuntu3).
build-essential set to manually installed.
gcc is already the newest version (4:11.2.0-1ubuntu1).
gfortran is already the newest version (4:11.2.0-1ubuntu1).
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
cmake : Depends: libjsoncpp25 (>= 1.9.5) but it is not going to be installed
Depends: librhash0 (>= 1.2.6) but it is not going to be installed
Depends: cmake-data (= 3.22.1-1ubuntu1.22.04.2) but it is not going to be installed
qemu-user-binfmt : Breaks: qemu-user-static
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

https://dev.azure.com/daal/DAAL/_build/results?buildId=58377&view=logs&jobId=7fa2fe30-a155-550c-7010-1fb992734fdc&j=7fa2fe30-a155-550c-7010-1fb992734fdc&t=4a793525-59cb-541f-9719-5240f27cc1d9

Copy link
Copy Markdown
Contributor

@david-cortes-intel david-cortes-intel Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the problem might be caused by this:
https://github.com/Alexandr-Solovev/oneDAL/blob/5266602d376f49f80fc1856b2dba1634c93295e1/.ci/env/apt.sh#L83

It shouldn't be manually downloading .deb files from the debian main repository and then installing them with dpkg, since it is running ubuntu.

The ubuntu equivalent would be the qemu-user package.

@Alexandr-Solovev Could you try installing the correct ubuntu package and seeing if that eliminates the need for such workarounds?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that it might require updating to the latest ubuntu. The CI uses 22.04, which probably doesn't have that package.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess, that the reason, that previously we skipped this step for a long time, due to
TBB_CACHE_DIR : $(Pipeline.Workspace)/tbb-riscv64-clang was not empty.
In the main

Image

But I will take a look on your guess today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants