33
33
DPCTL_VERSION : 0.18.1
34
34
DPNP_VERSION : 0.16.0
35
35
DPCTL_PY_VERSIONS : ' 3.9\|3.11'
36
+ UXL_PYTHONVERSION : " 3.12"
37
+ UXL_SKLEARNVERSION : " 1.4"
38
+ ONEDAL_REPO : " uxlfoundation/oneDAL"
36
39
37
40
jobs :
41
+
42
+ onedal_nightly :
43
+ runs-on : ubuntu-24.04
44
+ name : Identify oneDAL nightly
45
+ timeout-minutes : 2
46
+
47
+ steps :
48
+ - name : Get run ID of "Nightly-build" workflow
49
+ id : get-run-id
50
+ run : |
51
+ WF_NAME="Nightly-build"
52
+ JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId'
53
+ RUN_ID=`gh run --repo ${{ env.ONEDAL_REPO }} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"`
54
+ echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}"
55
+ echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
56
+ env :
57
+ GH_TOKEN : ${{ github.token }}
58
+ outputs :
59
+ run-id : ${{ steps.get-run-id.outputs.run-id }}
60
+ uxl-python : ${{ env.UXL_PYTHONVERSION }}
61
+ uxl-sklearn : ${{ env.UXL_SKLEARNVERSION }}
62
+
38
63
sklearn_lnx :
64
+ needs : onedal_nightly
39
65
strategy :
40
66
fail-fast : false
41
67
matrix :
46
72
SKLEARN_VERSION : " 1.2"
47
73
- PYTHON_VERSION : " 3.11"
48
74
SKLEARN_VERSION : " 1.3"
49
- name : LinuxNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }}
75
+ name : LinuxNightly/venv Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }}
50
76
runs-on : ubuntu-24.04
51
77
timeout-minutes : 120
52
78
@@ -57,32 +83,21 @@ jobs:
57
83
uses : actions/setup-python@v5
58
84
with :
59
85
python-version : ${{ matrix.PYTHON_VERSION }}
60
- - name : Get run ID of "Nightly-build" workflow
61
- id : get-run-id
62
- run : |
63
- OTHER_REPO="uxlfoundation/oneDAL"
64
- WF_NAME="Nightly-build"
65
- JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId'
66
- RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"`
67
- echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}"
68
- echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
69
- env :
70
- GH_TOKEN : ${{ github.token }}
71
86
- name : Download oneDAL build artifact
72
87
uses : actions/download-artifact@v4
73
88
with :
74
89
name : __release_lnx
75
90
github-token : ${{ github.token }}
76
- repository : uxlfoundation/oneDAL
77
- run-id : ${{ steps.get-run-id .outputs.run-id }}
91
+ repository : ${{ env.ONEDAL_REPO }}
92
+ run-id : ${{ needs.onedal_nightly .outputs.run-id }}
78
93
path : ./__release_lnx
79
94
- name : Download oneDAL environment artifact
80
95
uses : actions/download-artifact@v4
81
96
with :
82
97
name : oneDAL_env
83
98
github-token : ${{ github.token }}
84
- repository : uxlfoundation/oneDAL
85
- run-id : ${{ steps.get-run-id .outputs.run-id }}
99
+ repository : ${{ env.ONEDAL_REPO }}
100
+ run-id : ${{ needs.onedal_nightly .outputs.run-id }}
86
101
path : .ci/env
87
102
- name : Set Environment Variables
88
103
id : set-env
@@ -161,6 +176,7 @@ jobs:
161
176
bash .ci/scripts/run_sklearn_tests.sh $CPU
162
177
163
178
sklearn_win :
179
+ needs : onedal_nightly
164
180
strategy :
165
181
fail-fast : false
166
182
matrix :
@@ -171,7 +187,7 @@ jobs:
171
187
SKLEARN_VERSION : " 1.2"
172
188
- PYTHON_VERSION : " 3.11"
173
189
SKLEARN_VERSION : " 1.3"
174
- name : WindowsNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }}
190
+ name : WindowsNightly/venv Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }}
175
191
runs-on : windows-2025
176
192
timeout-minutes : 120
177
193
@@ -182,33 +198,21 @@ jobs:
182
198
uses : actions/setup-python@v5
183
199
with :
184
200
python-version : ${{ matrix.PYTHON_VERSION }}
185
- - name : Get run ID of "Nightly-build" workflow
186
- id : get-run-id
187
- shell : bash
188
- run : |
189
- OTHER_REPO="uxlfoundation/oneDAL"
190
- WF_NAME="Nightly-build"
191
- JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId'
192
- RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"`
193
- echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}"
194
- echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT"
195
- env :
196
- GH_TOKEN : ${{ github.token }}
197
201
- name : Download oneDAL build artifact
198
202
uses : actions/download-artifact@v4
199
203
with :
200
204
name : __release_win
201
205
github-token : ${{ github.token }}
202
- repository : uxlfoundation/oneDAL
203
- run-id : ${{ steps.get-run-id .outputs.run-id }}
206
+ repository : ${{ env.ONEDAL_REPO }}
207
+ run-id : ${{ needs.onedal_nightly .outputs.run-id }}
204
208
path : ./__release_win
205
209
- name : Download Intel BaseKit artifact
206
210
uses : actions/download-artifact@v4
207
211
with :
208
212
name : intel_oneapi_basekit
209
213
github-token : ${{ github.token }}
210
- repository : uxlfoundation/oneDAL
211
- run-id : ${{ steps.get-run-id .outputs.run-id }}
214
+ repository : ${{ env.ONEDAL_REPO }}
215
+ run-id : ${{ needs.onedal_nightly .outputs.run-id }}
212
216
- name : Decompress Intel BaseKit
213
217
shell : cmd
214
218
run : |
@@ -234,8 +238,8 @@ jobs:
234
238
with :
235
239
name : opencl_rt_installer
236
240
github-token : ${{ github.token }}
237
- repository : uxlfoundation/oneDAL
238
- run-id : ${{ steps.get-run-id .outputs.run-id }}
241
+ repository : ${{ env.ONEDAL_REPO }}
242
+ run-id : ${{ needs.onedal_nightly .outputs.run-id }}
239
243
path : .
240
244
- name : Install Intel OpenCL CPU Runtime
241
245
if : ${{ steps.set-env.outputs.DPCFLAG == '' }}
@@ -313,3 +317,182 @@ jobs:
313
317
if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu
314
318
set SKLEARNEX_PREVIEW=YES
315
319
bash .ci/scripts/run_sklearn_tests.sh %CPU%
320
+
321
+ build_uxl :
322
+ if : github.repository == 'uxlfoundation/scikit-learn-intelex'
323
+ needs : onedal_nightly
324
+ name : LinuxNightly build Python${{ needs.onedal_nightly.outputs.uxl-python }}
325
+ runs-on : uxl-xlarge
326
+ timeout-minutes : 30
327
+
328
+ steps :
329
+ - name : Checkout Scikit-learn-intelex
330
+ uses : actions/checkout@v4
331
+ - name : Install Python
332
+ uses : actions/setup-python@v5
333
+ with :
334
+ python-version : ${{ env.UXL_PYTHONVERSION }}
335
+ cache : ' pip'
336
+ cache-dependency-path : |
337
+ **/dependencies-dev
338
+ **/requirements-test.txt
339
+ - name : Download oneDAL build artifact
340
+ uses : actions/download-artifact@v4
341
+ with :
342
+ name : __release_lnx
343
+ github-token : ${{ github.token }}
344
+ repository : ${{ env.ONEDAL_REPO }}
345
+ run-id : ${{ needs.onedal_nightly.outputs.run-id }}
346
+ path : ./__release_lnx
347
+ - name : Download oneDAL environment artifact
348
+ uses : actions/download-artifact@v4
349
+ with :
350
+ name : oneDAL_env
351
+ github-token : ${{ github.token }}
352
+ repository : ${{ env.ONEDAL_REPO }}
353
+ run-id : ${{ needs.onedal_nightly.outputs.run-id }}
354
+ path : .ci/env
355
+ - name : Set Environment Variables
356
+ id : set-env
357
+ run : |
358
+ # Disable SPMD testing
359
+ echo "NO_DIST=1" >> "$GITHUB_ENV"
360
+ # enable coverage report generation
361
+ echo "SKLEARNEX_GCOV=1" >> "$GITHUB_ENV"
362
+ - name : apt-get
363
+ run : sudo apt-get update && sudo apt-get install -y clang-format
364
+ - name : dpcpp installation
365
+ run : |
366
+ # This CI system yields oneAPI dependencies from the oneDAL repository
367
+ bash .ci/env/apt.sh dpcpp
368
+ - name : describe system
369
+ run : |
370
+ source /opt/intel/oneapi/setvars.sh
371
+ bash .ci/scripts/describe_system.sh
372
+ - name : Install develop requirements
373
+ id : install-reqs
374
+ run : |
375
+ pip install -r dependencies-dev
376
+ echo "numpy-version=$(python -m pip freeze | grep numpy)" >> "$GITHUB_OUTPUT"
377
+ pip list
378
+ - name : Build daal4py/sklearnex
379
+ run : |
380
+ source .github/scripts/activate_components.sh ${{ steps.set-env.outputs.DPCFLAG }}
381
+ python setup.py bdist_wheel
382
+ - name : Archive sklearnex build
383
+ uses : actions/upload-artifact@v4
384
+ with :
385
+ name : sklearnex_build_${{ env.UXL_PYTHONVERSION }}
386
+ path : |
387
+ ./dist/*.whl
388
+
389
+ outputs :
390
+ numpy-version : ${{ steps.install-reqs.outputs.numpy-version }}
391
+
392
+ test_uxl :
393
+ strategy :
394
+ fail-fast : false
395
+ matrix :
396
+ include :
397
+ - OS : uxl-gpu-xlarge
398
+ FRAMEWORKS : " pytorch,numpy"
399
+ DEVICE : gpu
400
+ - OS : uxl-xlarge
401
+ FRAMEWORKS : " pytorch,numpy"
402
+ DEVICE : cpu
403
+ needs : [onedal_nightly, build_uxl]
404
+ name : LinuxNightly [${{ matrix.FRAMEWORKS }}]-${{ matrix.DEVICE }} test Python${{ needs.onedal_nightly.outputs.uxl-python }}_Sklearn${{ needs.onedal_nightly.outputs.uxl-sklearn }}
405
+ runs-on : ${{ matrix.OS }}
406
+ timeout-minutes : 120
407
+ steps :
408
+ - name : Checkout Scikit-learn-intelex
409
+ uses : actions/checkout@v4
410
+ - name : Install Python
411
+ uses : actions/setup-python@v5
412
+ with :
413
+ python-version : ${{ env.UXL_PYTHONVERSION }}
414
+ cache-dependency-path : |
415
+ **/dependencies-dev
416
+ **/requirements-test.txt
417
+ - name : Download oneDAL build artifact
418
+ uses : actions/download-artifact@v4
419
+ with :
420
+ name : __release_lnx
421
+ github-token : ${{ github.token }}
422
+ repository : ${{ env.ONEDAL_REPO }}
423
+ run-id : ${{ needs.onedal_nightly.outputs.run-id }}
424
+ path : ./__release_lnx
425
+ - name : Download oneDAL environment artifact
426
+ uses : actions/download-artifact@v4
427
+ with :
428
+ name : oneDAL_env
429
+ github-token : ${{ github.token }}
430
+ repository : ${{ env.ONEDAL_REPO }}
431
+ run-id : ${{ needs.onedal_nightly.outputs.run-id }}
432
+ path : .ci/env
433
+ - name : Set Environment Variables
434
+ id : set-env
435
+ run : |
436
+ echo "NO_DIST=1" >> "$GITHUB_ENV"
437
+ # enable coverage report generation
438
+ echo "COVERAGE_RCFILE=$(readlink -f .coveragerc)" >> "$GITHUB_ENV"
439
+ echo "ONEDAL_PYTEST_FRAMEWORKS=${{ matrix.FRAMEWORKS }}" >> "$GITHUB_ENV"
440
+ # reduce GPU driver/runner related memory issues
441
+ echo "NEOReadDebugKeys=1" >> "$GITHUB_ENV"
442
+ echo "EnableRecoverablePageFaults=1" >> "$GITHUB_ENV"
443
+ echo "GpuFaultCheckThreshold=0" >> "$GITHUB_ENV"
444
+ # set build numpy version for use in generating code coverage
445
+ echo "NUMPY_BUILD=${{ needs.build_uxl.outputs.numpy-version }}" >> "$GITHUB_ENV"
446
+ - name : apt-get
447
+ run : sudo apt-get update
448
+ - name : dpcpp installation
449
+ run : |
450
+ # This CI system yields oneAPI dependencies from the oneDAL repository
451
+ bash .ci/env/apt.sh dpcpp
452
+ - name : describe system
453
+ run : |
454
+ source /opt/intel/oneapi/setvars.sh
455
+ bash .ci/scripts/describe_system.sh
456
+ - name : Install test requirements
457
+ run : |
458
+ bash .ci/scripts/setup_sklearn.sh ${{ env.UXL_SKLEARNVERSION }}
459
+ pip install --upgrade -r requirements-test.txt
460
+ pip install $(python .ci/scripts/get_compatible_scipy_version.py ${{ env.UXL_SKLEARVERSION }}) pyyaml
461
+ pip list
462
+ - name : Download sklearnex wheel
463
+ uses : actions/download-artifact@v4
464
+ with :
465
+ name : sklearnex_build_${{ env.UXL_PYTHONVERSION }}
466
+ - name : Install PyTorch
467
+ if : contains(matrix.FRAMEWORKS, 'pytorch')
468
+ run : |
469
+ pip install torch --index-url https://download.pytorch.org/whl/xpu
470
+ python -c "import torch; _=[print(torch.xpu.get_device_name(i)) for i in range(torch.xpu.device_count())]"
471
+ - name : Install daal4py/sklearnex
472
+ run : pip install *.whl
473
+ - name : Sklearnex testing
474
+ run : |
475
+ source .github/scripts/activate_components.sh
476
+ export COVERAGE_FILE=$(pwd)/.coverage.sklearnex
477
+ cd .ci
478
+ ../conda-recipe/run_test.sh
479
+ - name : Sklearn testing
480
+ run : |
481
+ source .github/scripts/activate_components.sh
482
+ export COVERAGE_FILE=$(pwd)/.coverage.sklearn
483
+ bash .ci/scripts/run_sklearn_tests.sh ${{ matrix.DEVICE }}
484
+ - name : Create coverage report
485
+ run : |
486
+ source .github/scripts/activate_components.sh
487
+ bash .github/scripts/generate_coverage_reports.sh uxl_lnx_${{ matrix.DEVICE }}
488
+ - name : Archive coverage report
489
+ uses : actions/upload-artifact@v4
490
+ with :
491
+ name : coverage_uxl_lnx_${{ matrix.DEVICE }}
492
+ path : |
493
+ *uxl_lnx_${{ matrix.DEVICE }}.info
494
+ - name : Sklearn testing [preview]
495
+ run : |
496
+ source .github/scripts/activate_components.sh
497
+ export SKLEARNEX_PREVIEW='YES'
498
+ bash .ci/scripts/run_sklearn_tests.sh ${{ matrix.DEVICE }}
0 commit comments