Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c750c6
conda: split GPU runtime into dal-gpu package
napetrov Mar 5, 2026
154290a
conda: move all *_dpc runtime libs to dal-gpu
napetrov Mar 5, 2026
836c9fd
conda: ensure libtbb.so symlink exists in build env
napetrov Mar 5, 2026
fbad392
conda: fix libtbb.so symlink in test-devel.sh for MKL cmake find
napetrov Mar 6, 2026
94c46d3
conda: fix dal-gpu skip selector (use build.skip instead of name sele…
napetrov Mar 6, 2026
4cd9548
conda: fix TBB cmake detection for DPC++ examples (set TBB_tbb_FOUND=…
napetrov Mar 6, 2026
545a2ae
conda: hardcode oneapi/dpc example validation to dynamic mode
napetrov Mar 7, 2026
0762753
conda: tighten dal-gpu split packaging/test robustness
napetrov Mar 7, 2026
bf4b405
conda: fix test-devel.sh shebang and mkdir idempotency
napetrov Mar 7, 2026
54c0409
Merge branch 'main' into conda/dal-gpu-split
Alexandr-Solovev Mar 10, 2026
5b5fff7
conda: add mkl runtime dependency for dal-gpu
napetrov Mar 10, 2026
360a36f
conda: harden dal-gpu packaging and devel tests
napetrov Mar 10, 2026
2e1cf61
conda: mirror all libtbb* libs into TBBROOT staging (fix libtbbmalloc…
napetrov Mar 10, 2026
3d3f8d9
Merge branch 'main' into conda/dal-gpu-split
Alexandr-Solovev Mar 11, 2026
ab49f00
conda: fix dal-gpu runtime deps: use intel-sycl-rt and mkl-dpcpp
napetrov Mar 11, 2026
7914632
conda: fix example data path in dal-devel tests
napetrov Mar 12, 2026
b6a4d71
conda: make dal-devel example data lookup robust in CI test env
napetrov Mar 12, 2026
96d5c4e
conda: install example data into dal-devel package and fix test data …
napetrov Mar 12, 2026
c65e1bc
conda: use per-output ignore_run_exports_from for intel-sycl-rt
napetrov Mar 17, 2026
4864b64
conda: ignore dpcpp_impl run_exports for all non-GPU outputs
napetrov Mar 17, 2026
0a3871d
Merge branch 'main' into conda/dal-gpu-split
Alexandr-Solovev Mar 27, 2026
382f101
conda: clarify dal-devel data install path comment
napetrov Mar 28, 2026
65763ca
conda: make test script POSIX and stabilize dataset source path
napetrov Mar 28, 2026
c5ddfe8
conda: fix remaining review issues for dal-gpu/devel packaging
napetrov Mar 29, 2026
a7785f9
Merge branch 'main' into conda/dal-gpu-split
Alexandr-Solovev Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion conda-recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,33 @@
# limitations under the License.
#===============================================================================

export TBBROOT=$PREFIX
export DPL_ROOT=$PREFIX

# Use isolated TBBROOT staging so we don't create files under $PREFIX that may
# accidentally end up in output packages.
# conda-forge tbb-devel may expose only versioned SONAMEs (libtbb.so.<N>,
# libtbbmalloc.so.<N>, etc.) while oneDAL Make expects unversioned names in
# TBBROOT/lib prerequisites. Mirror the full libtbb* tree into a staging dir,
# adding unversioned symlinks where missing.
export TBBROOT="$SRC_DIR/__tbbroot"
mkdir -p "$TBBROOT/lib" "$TBBROOT/include"

# Symlink TBB headers (TBBROOT/include -> $PREFIX/include)
ln -sfn "$PREFIX/include" "$TBBROOT/include"

# Mirror all libtbb* shared objects and create unversioned symlinks if absent
for versioned in "$PREFIX/lib"/libtbb*.so.*; do
[ -e "$versioned" ] || continue
libname=$(basename "$versioned")
# Link versioned file into staging dir
ln -sfn "$versioned" "$TBBROOT/lib/$libname"
# Derive unversioned name: libtbbmalloc.so.2.6 -> libtbbmalloc.so
unversioned="${libname%%\.so\.*}.so"
if [ ! -e "$TBBROOT/lib/$unversioned" ]; then
ln -sfn "$versioned" "$TBBROOT/lib/$unversioned"
fi
done

# default flags set by conda-build create problems with oneDAL build system
unset CFLAGS LDFLAGS CXXFLAGS
# CONDA_CXX_COMPILER is set by the conda recipe
Expand Down
47 changes: 43 additions & 4 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ build:
number: {{ buildnumber }}
string: h{{ git_hash }}_{{ buildnumber }}_{{ cxx_compiler }}
include_recipe: False
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]
# Note: ignore_run_exports_from is NOT set globally here.
# It is set per-output: dal (CPU) ignores dpcpp_impl run_exports so it
# does not pull GPU/SYCL runtime. dal-gpu does NOT ignore them, so it
# automatically inherits the compatible intel-sycl-rt pin declared by
# dpcpp_impl_linux-64 via run_exports, keeping SYCL runtime in sync
# with the compiler used at build time.
script_env:
# All build targets are used by default and AVX2 only for CI.
# Override REQCPU to reduce manual build time if needed: `REQCPU=avx512 conda build .`
Expand All @@ -62,19 +66,47 @@ requirements:

outputs:
- name: dal
build:
# Suppress dpcpp_impl run_exports for the CPU-only package:
# dal must not pull GPU/SYCL runtime (intel-sycl-rt).
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]
script: pack.sh # [linux]
requirements:
run:
- tbb
test:
commands:
- test -f $PREFIX/lib/libonedal_core.so.{{ major_binary_version }} # [linux]
- test -f $PREFIX/lib/libonedal_dpc.so.{{ major_binary_version }} # [linux]
- test -f $PREFIX/lib/libonedal_thread.so.{{ major_binary_version }} # [linux]
about:
summary: oneAPI Data Analytics Library (oneDAL) runtime libraries
summary: oneAPI Data Analytics Library (oneDAL) CPU runtime libraries

- 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" ]

# Do NOT set ignore_run_exports_from here: dpcpp_impl_linux-64 declares
# run_exports with a compatible intel-sycl-rt pin. dal-gpu inherits it
# automatically — no manual pin needed.
script: pack.sh # [linux]
requirements:
run:
- {{ pin_subpackage('dal', exact=True) }}
# intel-sycl-rt is intentionally absent from the explicit run: list.
# It is injected automatically via run_exports from dpcpp_impl_linux-64,
# ensuring the SYCL runtime version matches the compiler used to build.
- mkl-dpcpp # [linux64]
test:
commands:
- test -f $PREFIX/lib/libonedal_dpc.so.{{ major_binary_version }} # [linux]
- test -f $PREFIX/lib/libonedal_parameters_dpc.so.{{ major_binary_version }} # [linux]
about:
summary: oneAPI Data Analytics Library (oneDAL) GPU/DPC++ runtime library

- name: dal-include
build:
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]
script: pack.sh # [linux]
test:
commands:
Expand All @@ -83,6 +115,9 @@ outputs:
summary: Headers for building against oneAPI Data Analytics Library (oneDAL)

- name: dal-static
build:
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]
script: pack.sh # [linux]
requirements:
run:
Expand All @@ -95,6 +130,9 @@ outputs:
summary: Static libraries for oneAPI Data Analytics Library (oneDAL)

- name: dal-devel
build:
ignore_run_exports_from:
- dpcpp_impl_linux-64 # [linux64 or win]
script: pack.sh # [linux]
requirements:
run:
Expand All @@ -109,6 +147,7 @@ outputs:
- mkl-devel
- mkl-static
- mkl-devel-dpcpp # [ cxx_compiler == "dpcpp" ]
- dal-gpu =={{ version }} # [ cxx_compiler == "dpcpp" ]
source_files:
- examples
script: test-devel.sh # [linux]
Expand Down
20 changes: 18 additions & 2 deletions conda-recipe/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,21 @@ if [ "$PKG_NAME" = "dal-devel" ]; then
cp -r "env" "$PREFIX/"
cp -r "lib/cmake" "$PREFIX/lib/"
cp -r "lib/pkgconfig" "$PREFIX/lib/"
# Install example datasets so dal-devel test can find them via $CONDA_PREFIX/data
if [ -d "../../examples/oneapi/data" ]; then
mkdir -p "$PREFIX/share/oneDAL/data"
cp -f "../../examples/oneapi/data/"*.csv "$PREFIX/share/oneDAL/data/" 2>/dev/null || true
elif [ -d data ]; then
mkdir -p "$PREFIX/share/oneDAL/data"
cp -f data/*.csv "$PREFIX/share/oneDAL/data/" 2>/dev/null || true
fi
# set up links necessary for proper works of pkg-config, cmake and env. script
mkdir -p "$PREFIX/lib/intel64"
for lib in lib/intel64/libonedal*.so*; do
# Keep dal-devel CPU-oriented: do not create intel64 links for DPC runtime libs.
case "$lib" in
*"_dpc"*) continue ;;
esac
if [ -f "$lib" ]; then
libname=$(basename "$lib")
ln -sf "../$libname" "$PREFIX/lib/intel64/$libname"
Expand All @@ -40,9 +52,13 @@ if [ "$PKG_NAME" = "dal-include" ]; then
mkdir -p "$PREFIX/include"
cp -r include/* "$PREFIX/include/"
fi
# copy libraries
# copy CPU runtime libraries (excludes all DPC++ runtime libs, moved to dal-gpu)
if [ "$PKG_NAME" = "dal" ]; then
find lib/intel64 -name "libonedal*.so*" -exec cp -P {} "$PREFIX/lib/" \;
find lib/intel64 -name "libonedal*.so*" ! -name "libonedal*_dpc*" -exec cp -P {} "$PREFIX/lib/" \;
fi
# copy GPU/DPC++ runtime libraries
if [ "$PKG_NAME" = "dal-gpu" ]; then
find lib/intel64 -name "libonedal*_dpc*.so*" -exec cp -P {} "$PREFIX/lib/" \;
fi
if [ "$PKG_NAME" = "dal-static" ]; then
find lib/intel64 -name "libonedal*.a" -exec cp {} "$PREFIX/lib/" \;
Expand Down
119 changes: 114 additions & 5 deletions conda-recipe/test-devel.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
set -euo pipefail
#===============================================================================
# Copyright contributors to the oneDAL project
#
Expand All @@ -23,6 +24,7 @@ source $CONDA_PREFIX/env/vars.sh
run_examples() {
local interface_name=$1
local linking_type=$2
local extra_cmake_args=${3:-""}

if [ "$linking_type" == "dynamic" ]; then
library_postfix="so"
Expand All @@ -32,7 +34,16 @@ run_examples() {

(
cd examples/$interface_name/cpp
mkdir build_$linking_type
# Ensure oneapi example datasets are reachable for get_data_path().
# Preferred layout is ../data relative to this directory.
if [ ! -d ../data ] && [ -d "$CONDA_PREFIX/share/oneDAL/data" ]; then
ln -sf "$CONDA_PREFIX/share/oneDAL/data" ../data
fi
if [ ! -e data ] && [ -d ../data ]; then
ln -s ../data data
fi
rm -rf build_$linking_type
mkdir -p build_$linking_type

(
cd build_$linking_type
Expand All @@ -44,22 +55,120 @@ run_examples() {
if [ "$linking_type" == "static" ]; then
cmake_args="$cmake_args -DTBB_tbb_FOUND=YES"
fi
cmake_args="$cmake_args $extra_cmake_args"

cmake .. $cmake_args
make -j$(nproc)
)

for example in _cmake_results/intel_intel64_$library_postfix/*; do
examples_pattern="_cmake_results/intel_intel64_$library_postfix/*"
set -- $examples_pattern
if [ "$1" = "$examples_pattern" ]; then
echo "ERROR: no built examples found for $interface_name-$linking_type"
return 1
fi

for example in "$@"; do
echo "================"
echo "Running example: $interface_name-$linking_type-$(basename "$example")"
echo "================"
"$example"
done
)
}

run_dpc_examples() {
# DPC++ examples are validated only in dynamic mode.
# We do not produce static DPC++ artifacts in conda packaging.
local linking_type="dynamic"
local library_postfix="so"

(
cd examples/oneapi/dpc
# Keep data path layout consistent with oneapi/cpp examples.
if [ ! -d ../data ] && [ -d "$CONDA_PREFIX/share/oneDAL/data" ]; then
ln -sf "$CONDA_PREFIX/share/oneDAL/data" ../data
fi
if [ ! -e data ] && [ -d ../data ]; then
ln -s ../data data
fi
rm -rf build_$linking_type
mkdir -p build_$linking_type

(
cd build_$linking_type

cmake_args="-DONEDAL_LINK=$linking_type"
# Note: MKL cmake config (incl. SYCL variant) requires TBB to be findable at configure time.
# conda-forge tbb-devel does not ship TBBConfig.cmake, so we set TBB as found manually
# (same approach as for the static CPU build above).
cmake_args="$cmake_args -DTBB_tbb_FOUND=YES"

cmake .. $cmake_args
make -j$(nproc)
)

examples_pattern="_cmake_results/intel_intel64_$library_postfix/*"
set -- $examples_pattern
if [ "$1" = "$examples_pattern" ]; then
echo "ERROR: no built oneapi/dpc examples found"
return 1
fi

for example in "$@"; do
echo "================"
echo "Running example: $interface_name-$linking_type-$(basename $example)"
echo "Running example: oneapi-dpc-$linking_type-$(basename "$example")"
echo "================"
$example
"$example"
done
)
}

# ============================================================
# CPU-only tests: oneapi/cpp + daal (no GPU lib required)
# These must pass even without dal-gpu installed.
# ============================================================
echo "========================================"
echo "Running CPU examples: oneapi/cpp dynamic"
echo "========================================"
run_examples oneapi dynamic

echo "========================================"
echo "Running CPU examples: oneapi/cpp static"
echo "========================================"
run_examples oneapi static

echo "========================================"
echo "Running CPU examples: daal/cpp dynamic"
echo "========================================"
run_examples daal dynamic

echo "========================================"
echo "Running CPU examples: daal/cpp static"
echo "========================================"
run_examples daal static

# ============================================================
# GPU/DPC++ tests: oneapi/dpc (requires dal-gpu / libonedal_dpc.so)
# Skipped if GPU library is not installed.
# ============================================================
has_dpc=$(find "$CONDA_PREFIX/lib" -maxdepth 1 -name "libonedal_dpc.so*" | head -1)
has_dpc_params=$(find "$CONDA_PREFIX/lib" -maxdepth 1 -name "libonedal_parameters_dpc.so*" | head -1)
if [ -n "$has_dpc" ] && [ -n "$has_dpc_params" ]; then
# Workaround: MKL cmake config requires unversioned libtbb.so for tbb_thread threading.
# conda-forge tbb-devel may only provide versioned soname (libtbb.so.<N>).
if [ ! -f "$CONDA_PREFIX/lib/libtbb.so" ]; then
tbb_so=$(find "$CONDA_PREFIX/lib" -maxdepth 1 -name "libtbb.so.*" | head -1)
[ -n "$tbb_so" ] && ln -sf "$(basename "$tbb_so")" "$CONDA_PREFIX/lib/libtbb.so"
fi
echo "========================================"
echo "Running GPU/DPC++ examples: oneapi/dpc dynamic"
echo "========================================"
run_dpc_examples
else
echo "========================================"
echo "Skipping GPU/DPC++ examples: dal-gpu is not fully installed"
echo "========================================"
fi

# TODO: add testing for samples
Loading