Skip to content

Feature/win arm64 support #2629

Feature/win arm64 support

Feature/win arm64 support #2629

Workflow file for this run

#===============================================================================
# Copyright contributors to the oneDAL project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================
name: Nightly-build
# agent: This action is only for building oneDAL, implement tests in Nightly-test
# It is a dependency of uxlfoundation/scikit-learn-intelex's `CI` GitHub action.
# Therefore all changes must be coordinated with .github/workflows/ci.yml in
# scikit-learn-intelex. In all circumstances, this job should stay green.
on:
schedule:
- cron: '0 21 * * *'
pull_request:
branches:
- main
paths:
# running on PRs is to enable 1) no breakages in this action 2) run Nightly-test
- .github/workflows/nightly-build.yml
- .ci/pipeline/ci.yml
- .bazelrc
- MODULE.bazel
- BUILD
- makefile
- '.ci/env/**'
- '.ci/scripts/**'
# Bazel is included for enabling Nightly-test.yml functionality
- 'dev/bazel/**'
- 'dev/release_tests/**'
- 'dev/make/**'
- 'dev/make/compiler_definitions/**'
- 'dev/make/function_definitions/**'
workflow_dispatch:
# use workflow dispatch to force recent changes in oneDAL for use in sklearnex.
# That way waiting for the cron job does not occur, especially in time critical
# circumstances.
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
env:
WINDOWS_ALL_COMPONENTS: 'intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel'
jobs:
build_lnx:
name: oneDAL Linux nightly build
if: github.repository == 'uxlfoundation/oneDAL'
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- name: Checkout oneDAL
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install DPC++
run: .ci/env/apt.sh dpcpp
- name: Install MKL
run: .ci/env/apt.sh mkl
- name: System Info
run: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/describe_system.sh
- name: Make daal
run: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target daal
- name: Make onedal
run: |
source /opt/intel/oneapi/setvars.sh
.ci/scripts/build.sh --compiler icx --optimizations avx2 --target onedal
- name: Archive build
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: __release_lnx
path: ./__release_lnx
- name: Archive oneDAL environment
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: oneDAL_env
path: .ci/env
# The environment is reused in sklearnex in order to prevent version mismatch
# in dependencies like the ICX compiler, TBB and MKL. This in essence replicates
# The storage of the basekit which occurs in the Windows build.
build_win:
name: oneDAL Windows nightly build
if: github.repository == 'uxlfoundation/oneDAL'
runs-on: windows-2025
timeout-minutes: 180
steps:
- name: Checkout oneDAL
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install DPC++
shell: cmd
run: |
set PATH=C:\msys64\usr\bin;%PATH%
REM There is a single source of truth for the basekit URL used in oneDAL for tracking
REM by renovatebot. This is for maintainability and should not be redefined in this file.
for /f "delims=" %%i in ('grep -oP -m 1 "(?<=WINDOWS_BASEKIT_URL: ).*" .ci\pipeline\ci.yml') do set "baseurl=%%i"
call .ci\scripts\install_basekit.bat %baseurl:'="% ${{ env.WINDOWS_ALL_COMPONENTS }} .\oneapi\
- name: Prepare Intel OpenCL CPU runtime
run: |
# Store the unpacked runtime to centralize and reduce external downloads
# Doing this prevents spamming Intel servers which would take longer and waste resources
# When used in scikit-learn-intelex github CI systems
& .ci/scripts/collect_opencl_rt.ps1
- name: System Info
shell: cmd
run: |
set PATH=C:\msys64\usr\bin;%PATH%
pip install cpufeature
call .\oneapi\setvars.bat
bash .ci/scripts/describe_system.sh
- name: Make daal
shell: cmd
run: |
REM This builds a hybrid VC-icx(dpc) build. This reflects
REM legacy capability where development using publicly-available
REM compilers was only possible with Visual Studio on Windows.
REM Note this has an impact on internal optimizations used in oneDAL,
REM and has downstream impacts on performance and accuracy on sklearnex.
REM By default build.bat with VC does NOT use -O2. This hybrid build provides
REM diversity in downstream code path execution in sklearnex for robustness.
REM Changes in this must be justified with respect to these characteristics.
call .\oneapi\setvars.bat
call .\.ci\scripts\build.bat daal vc avx2
- name: Make onedal
shell: cmd
run: |
call .\oneapi\setvars.bat
call .\.ci\scripts\build.bat onedal_c vc avx2
- name: Make oneapi_dpc
shell: cmd
run: |
REM SYCL code compilation requires the ICX compiler
call .\oneapi\setvars.bat
call .\oneapi\compiler\latest\bin\sycl-ls.exe
call .\.ci\scripts\build.bat onedal_dpc vc avx2
REM While the build is now complete, no testing should occur. Only upload.
- name: Compress Intel BaseKit
shell: cmd
run: |
REM change absolute symlinks to relative symlinks for reuse (fix issue in Intel BaseKit which is still unresolved)
REM iterate through all dirs in basekit (%%s), use dir to find the symlink target for symlinks named 'latest' (%%H)
REM delete the symlink, and make a new symlink using the last foldername (%%~nxH) in a relative fashion
for /D %%s in (.\oneapi\*) do for /f "tokens=2 delims=[]" %%H in ('dir /al %%s\ ^| findstr /i /c:"latest"') do rmdir %%s\latest & mklink /D %%s\latest .\%%~nxH
tar -cvzf oneapi.tar.gz .\oneapi
- name: Archive build
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: __release_win
path: .\__release_win_vc
- name: Archive Intel BaseKit
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: intel_oneapi_basekit
path: .\oneapi.tar.gz
- name: Archive Intel OpenCL CPU runtime
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: opencl_rt_installer
path: .\opencl_rt.msi