Skip to content

scikit-learn-intelex: Add version 2026.1.0 - #2973

Draft
luhenry wants to merge 5 commits into
mainfrom
scikit-learn-intelex
Draft

luhenry wants to merge 5 commits into
mainfrom
scikit-learn-intelex

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles daal4py and the onedal pybind11/CMake module against a from-source oneDAL (CPU-only host iface, NO_DIST/NO_DPC). Upstream publishes no riscv64 wheel.

No equivalent upstream workflow builds this exact wheel; mirrors doc/building-from-source.rst's documented from-source recipe, which upstream states already covers ARM and RISC-V.

Differs from upstream

  • Builds oneDAL itself from source once per version (same recipe as the daal port's workflow) instead of consuming Intel's x86_64-only daal/daal-devel wheel.
  • Installs clang+clang-tools-extra from the image instead of the clang-format PyPI package, which ships no riscv64 binary.

Matrix: cp310-cp314 (no cp314t), matching upstream's own released interpreter set.

Testing

  • imports daal4py, onedal, sklearnex and calls patch_sklearn() instead of upstream's full pytest suite (GPU/distributed-only fixtures aside, this mirrors ci.yml's own smoke import).

License: Nothing third-party vendored; the wheel links oneDAL (separately licensed Apache-2.0) at runtime only.

Depends on the daal port (#2971) landing first for the runtime Requires-Dist pin to resolve; builds and tests independently since oneDAL is built from source in this workflow too.

PyPI's scikit-learn-intelex wheel is Apache-2.0 and links only against
the daal (oneDAL) libraries at runtime (Requires-Dist: daal==<version>,
no dpctl, no SYCL/MKL NEEDED entries in its own .so files). Its
setup.py already degrades to a plain arch-name DALROOT subdirectory
and has CPU-only (NO_DPC, NO_DIST) build switches; upstream's own docs
state it builds from source on ARM and RISC-V. This builds oneDAL from
source once per version (same recipe as the daal port) and reuses it
across the interpreter matrix to compile daal4py/_onedal_py_host,
instead of waiting on Intel's x86_64-only wheel or a closed MKL/SYCL
backend.
@luhenry
luhenry marked this pull request as draft October 13, 2026 09:26
@github-actions

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-2973/

Built to branch gh-pages at 2026-10-13 14:24 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

…R lookup

The oneTBB build step installed into lib64 (GNUInstallDirs' default on the
Rocky 10-based manylinux_riscv64 image, known gotcha 377), but oneDAL's
makefile hardcodes TBBDIR.libia.prefix := $(TBBROOT)/lib with no lib64
fallback when given --tbb-dir, so .ci/scripts/build.sh failed with
"Can`t find TBB runtimes nether in /work/tbb-install/lib...". Passing
-DCMAKE_INSTALL_LIBDIR=lib to the oneTBB cmake configure matches what
oneDAL's build expects.

luhenry commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

CI failure: Build oneDAL 2026.1.0 (riscv64)

What failed: the build_onedal job's .ci/scripts/build.sh --target daal ... step, with:

makefile:254: *** Can`t find TBB runtimes nether in /work/tbb-install/lib not in /work/tbb-install/lib..  Stop.

Root cause: the workflow builds oneTBB from source with a plain cmake --install /work/tbb-build (no CMAKE_INSTALL_LIBDIR override). On this Rocky 10-based manylinux_2_39_riscv64 image, CMake's GNUInstallDirs module defaults CMAKE_INSTALL_LIBDIR to lib64, so the shared libs land in /work/tbb-install/lib64/libtbb.so etc. (confirmed in the build log). oneDAL's own top-level makefile hardcodes the lookup path when given --tbb-dir/$TBBROOT:

TBBDIR.libia.prefix := $(TBBDIR.2)/lib

with no lib64 fallback (only a LD_LIBRARY_PATH fallback, which isn't set here), so the wildcard check on /work/tbb-install/lib/* finds nothing and the makefile aborts. This is the riscv64-specific manifestation of a known class of bug: Rocky's lib64 GNUInstallDirs default silently breaking a consumer that hardcodes lib (gotcha 377 in this repo's porting skill, previously seen with the mlx port). It's specific to this workflow's own from-source TBB build (there's no upstream CI building this wheel to compare against, and the x86_64 case uses Intel's prebuilt daal/daal-devel wheel instead of building TBB at all), not a bug in oneDAL/TBB themselves.

Fix: pass -DCMAKE_INSTALL_LIBDIR=lib on the oneTBB cmake configure step, so the install tree matches what oneDAL's build.sh --tbb-dir expects. Pushed to this branch.

…ld's bash -c quoting

The oneTBB comment added in the previous commit contained "oneDAL's", whose
apostrophe closed the single-quoted docker run bash -c script early. The
container only ran up to the oneTBB clone, and the rest of the script then
ran on the runner host, where cmake failed with "The source directory
/work/tbb-src does not exist". Reword the comment without quotes.
…hosts

The oneDAL build failed in the release step, before compiling anything:
dev/make/identify_os.sh only maps x86_64 and aarch64, so on the native
riscv64 runner it prints "Unknown architecture: riscv64", and the
_release_nuspec target that every daal/onedal_c release depends on runs
deploy/nuget/prepare_dal_nuget.sh, which exits with "Unknown platform
Unknown architecture: riscv64". Upstream never hits this because its
riscv64 CI cross-compiles from x86_64.

Carry a patch that makes identify_os.sh print lnxriscv64 on riscv64 and
gives prepare_dal_nuget.sh a matching lnxriscv64 branch, and apply it in
the build_onedal job before the container build.

The patch also makes the makefile treat the build as native (PLAT ==
IDENTIFIED_PLAT), so clang no longer gets --target=riscv64-linux-gnu.
That matters on Rocky 10: its GCC lives under riscv64-redhat-linux,
which clang does not search for a riscv64-linux-gnu target, so the
cross-mode flags would have lost the libstdc++ headers at the compile
step that comes next.
…arning

The build_onedal job failed in the Build oneDAL (riscv64) check: the very
first clang++ invocations (cpp/daal/src/services/*.cpp) errored with:

    clang++: error: argument unused during compilation:
    '--gcc-toolchain=/usr' [-Werror,-Wunused-command-line-argument]

dev/make/common.mk derives --gcc-toolchain from `which gcc` and passes it
to every clang compile, and clang.ref.riscv64.mk's COMPILER.lnx.clang
turns -Werror on. On this riscv64 manylinux image, clang's
GCCInstallation probe does not treat that hint as applicable to every
translation unit (at least the services/*.cpp ones, which pull in no
libstdc++ headers), so the otherwise-harmless "unused argument" notice
becomes a hard build failure. The same --gcc-toolchain mechanism runs
unconditionally for every clang platform (x86_64, arm, ...); only
riscv64 hits this, consistent with clang's RISC-V GCCInstallation
detection being newer/less-trodden than the other architectures'.

Carry a second patch adding -Wno-unused-command-line-argument next to
the existing -Werror, so this one diagnostic stays non-fatal without
changing which headers/libraries get searched or used.

PR #2971 (daal) builds oneDAL the same way and hits the identical
failure; this only fixes this port's own copy of the recipe.

This branch has not been deployed

No deployments
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