Skip to content

[conda] Split GPU runtime into dal-gpu package#3551

Open
napetrov wants to merge 25 commits intouxlfoundation:mainfrom
napetrov:conda/dal-gpu-split
Open

[conda] Split GPU runtime into dal-gpu package#3551
napetrov wants to merge 25 commits intouxlfoundation:mainfrom
napetrov:conda/dal-gpu-split

Conversation

@napetrov
Copy link
Copy Markdown
Contributor

@napetrov napetrov commented Mar 5, 2026

Summary

  • split GPU runtime (libonedal_dpc.so) from dal into dedicated dal-gpu conda package
  • keep dal as CPU runtime package (libonedal_core.so, libonedal_thread.so)
  • update dal-devel test requirements to include dal-gpu only for cxx_compiler == dpcpp
  • update test-devel.sh to always run CPU examples and run oneapi/dpc examples only when GPU runtime is installed

Motivation

Need explicit validation of two independent scenarios:

  1. CPU-only install (dal without dal-gpu) still passes CPU examples
  2. CPU + GPU install (dal + dal-gpu) enables DPC++ runtime coverage

This removes coupling between CPU runtime delivery and DPC++ runtime delivery in conda packaging.

Testing

  • local syntax check: bash -n conda-recipe/test-devel.sh
  • CI conda recipe workflow validates matrix behavior (gxx / clangxx / dpcpp)

Naming

  • package name follows agreed convention: dal-gpu

@napetrov napetrov added the infra label Mar 5, 2026
@napetrov napetrov marked this pull request as ready for review March 7, 2026 02:24
Copilot AI review requested due to automatic review settings March 7, 2026 02:24
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

Splits oneDAL’s conda packaging so the CPU runtime (dal) is decoupled from the GPU/DPC++ runtime (dal-gpu), and updates validation to cover both CPU-only and CPU+GPU install scenarios.

Changes:

  • Split packaging of DPC++ runtime libraries into a new dal-gpu output and exclude them from dal.
  • Update dal-devel test requirements so dal-gpu is only required for cxx_compiler == dpcpp.
  • Update test-devel.sh to always run CPU examples and conditionally run oneAPI DPC++ examples when GPU libs are present.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
conda-recipe/test-devel.sh Adds conditional execution for DPC++ examples and keeps CPU examples always running.
conda-recipe/pack.sh Splits copying of CPU vs DPC++ runtime shared libraries into dal vs dal-gpu.
conda-recipe/meta.yaml Introduces dal-gpu output and adjusts tests/requirements accordingly.
conda-recipe/build.sh Adds a build-time workaround to ensure an unversioned libtbb.so is available.

napetrov added 2 commits March 6, 2026 20:21
- dal-devel: skip intel64 symlink creation for *_dpc* runtime libs
  (CPU-oriented devel layout, aligns with dal-gpu split)
- test-devel.sh: detect dal-gpu via versioned or unversioned libonedal*_dpc.so*
- test-devel.sh: fail clearly if example output glob is empty instead of
  executing a literal wildcard pattern
Copilot AI review requested due to automatic review settings March 7, 2026 04:26
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 10, 2026 19:33
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

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

@napetrov
Copy link
Copy Markdown
Contributor Author

Addressed latest review comments in follow-up commits:

  • 5b5fff738 — add mkl runtime dependency for dal-gpu (aligns with dynamic oneMKL linkage from main)
  • 360a36f3d — hardening updates:
    1. conda-recipe/build.sh
      • stop creating libtbb.so under $PREFIX/lib
      • create isolated TBBROOT staging under $SRC_DIR/__tbbroot and place unversioned libtbb.so shim there only
    2. conda-recipe/test-devel.sh
      • add set -euo pipefail
      • clean build_* dirs before configure/build to avoid stale binaries on reruns
    3. conda-recipe/meta.yaml
      • tighten dal-gpu selector: skip: true # [cxx_compiler != "dpcpp" or not linux64]

This should address the recent Copilot notes and the MKL runtime dependency concern.

Copilot AI review requested due to automatic review settings March 10, 2026 20:59
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Create local data symlink in oneapi/cpp and oneapi/dpc test runs
when data is located at ../data. This matches test_tmp source_files
layout and avoids runtime file-open aborts in examples.
If examples/<iface>/data is missing in test_tmp, seed it from
/data before running examples. Keep local data symlink for
existing relative path expectations.
Copilot AI review requested due to automatic review settings March 12, 2026 05:20
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

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

…lookup

pack.sh: copy examples/oneapi/data/*.csv into PREFIX/share/oneDAL/data
so they survive into the test environment where work_dir is unavailable
(conda-build renames work/ before running tests, making source_files empty).

test-devel.sh: symlink CONDA_PREFIX/share/oneDAL/data as ../data before
running oneapi/cpp and oneapi/dpc examples so get_data_path() resolves
CSV files correctly.
@david-cortes-intel
Copy link
Copy Markdown
Contributor

@napetrov If having dpcpp_impl_linux-64 as a build-time dependency propagates the constraint on runtime packages, shouldn't that package be used only for the dal (CPU) package?

@napetrov
Copy link
Copy Markdown
Contributor Author

@napetrov If having dpcpp_impl_linux-64 as a build-time dependency propagates the constraint on runtime packages, shouldn't that package be used only for the dal (CPU) package?

we have
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]

which do not pull dependency down the line. 

we can move it from global section to outputs sections and do this for all but dal-gpu

Move ignore_run_exports_from: dpcpp_impl_linux-64 from the global
build: section to the dal output build: section only.

Previously the global setting suppressed run_exports for ALL outputs
including dal-gpu, forcing a manual intel-sycl-rt pin in dal-gpu run:.

With per-output placement:
- dal (CPU): ignores dpcpp_impl run_exports → no GPU/SYCL runtime dep
- dal-gpu: does NOT ignore run_exports → automatically inherits the
  compatible intel-sycl-rt pin declared by dpcpp_impl_linux-64,
  keeping SYCL runtime version in sync with the build compiler
Copilot AI review requested due to automatic review settings March 17, 2026 17:02
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

All outputs except dal-gpu should not pull GPU/SYCL runtime.
Add ignore_run_exports_from: dpcpp_impl_linux-64 to dal-include,
dal-static, and dal-devel outputs (dal already had it).
@david-cortes-intel
Copy link
Copy Markdown
Contributor

The CI error:

2026-03-30T10:59:03.3646296Z Could not solve for environment specs
2026-03-30T10:59:03.3646625Z The following package could not be installed
2026-03-30T10:59:03.3647432Z └─ dal-gpu =2025.10.0 0 does not exist (perhaps a typo or a missing channel).

So looks like something went wrong with the pinning.

@david-cortes-intel
Copy link
Copy Markdown
Contributor

Note that the version number is fetched from whatever is the last tag pushed, so 2025.10 is expectable, but it should be able to find the GPU package created in the recipe.

- mkl-devel
- mkl-static
- mkl-devel-dpcpp # [ cxx_compiler == "dpcpp" ]
- {{ pin_subpackage('dal-gpu', exact=True) }} # [ cxx_compiler == "dpcpp" ]
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Something here is not working correctly. It still gets pulled when it shouldn't. Either that, or dal-gpu is being built when it should.


- name: dal-gpu
build:
skip: true # [cxx_compiler != "dpcpp" or not linux64]
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.

This one has:

[cxx_compiler != "dpcpp" or not linux64]

But dal-devel has:

{{ pin_subpackage('dal-gpu', exact=True) }}  # [ cxx_compiler == "dpcpp" ]

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants