forked from intel/scikit-learn-intelex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
102 lines (98 loc) · 4.14 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
variables:
- name: WINDOWS_BASEKIT_URL
value: https://registrationcenter-download.intel.com/akdlm/irc_nas/17191/w_BaseKit_b_2021.1.10.2260.exe
- name: WINDOWS_DPCPP_COMPONENTS
value: intel.oneapi.win.dpcpp-compiler intel.oneapi.win.tbb.devel intel.oneapi.win.daal.devel
jobs:
- job: Linux_DPCPP
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
sudo apt-get install \
intel-oneapi-common-vars \
intel-oneapi-common-licensing \
intel-oneapi-dal-devel \
intel-oneapi-dpcpp-cpp-compiler \
intel-oneapi-dev-utilities \
intel-oneapi-libdpstd-devel
sudo bash -c 'echo libintelocl.so > /etc/OpenCL/vendors/intel-cpu.icd'
sudo mv -f /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga_
displayName: 'apt-get'
- script: |
conda update -y -q conda
conda create -q -y -n CB python=3.7 conda-build conda-verify
displayName: Create Anaconda environment
- script: |
export DPCPPROOT=/opt/intel/oneapi/compiler/latest
export DALROOT=/opt/intel/oneapi/dal/latest
export TBBROOT=/opt/intel/oneapi/tbb/latest
. /usr/share/miniconda/etc/profile.d/conda.sh
conda activate CB
conda build --override-channels -c intel -c conda-forge --numpy=1.17 conda-recipe
displayName: conda build
- job: MacOS
pool:
vmImage: 'macOS-10.15'
steps:
- script: |
echo "##vso[task.prependpath]$CONDA/bin"
sudo chown -R $USER $CONDA
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda create -n CB python=3.7 daal daal-include cython mpich jinja2 numpy clang-tools scikit-learn lightgbm xgboost pandas pytest -c conda-forge -c intel
displayName: Create Anaconda environment
- script: |
source activate CB
export DALROOT=$CONDA_PREFIX
export MPIROOT=$CONDA_PREFIX
export MACOSX_DEPLOYMENT_TARGET=10.15
export LDFLAGS="${LDFLAGS//-Wl,-dead_strip_dylibs}"
export LDFLAGS_LD="${LDFLAGS_LD//-dead_strip_dylibs}"
export LDSHARED="-bundle -undefined dynamic_lookup -flto -Wl,-export_dynamic -Wl,-pie -Wl,-headerpad_max_install_names"
python setup.py install
displayName: Conda build
- script: |
source activate CB
python -c "import daal4py"
mpirun -n 4 python -m unittest discover -v -s tests -p spmd*.py
python -m unittest discover -v -s tests -p test*.py
displayName: Testing
- script: |
source activate CB
cd examples && python run_examples.py
displayName: Examples
- job: Windows_DPCPP
pool:
vmImage: 'windows-latest'
steps:
- script: .ci/scripts/install_windows.bat $(WINDOWS_BASEKIT_URL) $(WINDOWS_DPCPP_COMPONENTS)
timeoutInMinutes: 15
displayName: oneAPI environment
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: conda create -q -y -n CB python=3.7 conda-build conda-verify
displayName: Create Anaconda environment
- script: |
call activate CB
set "DPCPPROOT=C:\Program Files (x86)\Intel\oneAPI\compiler\latest"
set "DALROOT=C:\Program Files (x86)\Intel\oneAPI\dal\latest"
set "TBBROOT=C:\Program Files (x86)\Intel\oneAPI\tbb\latest"
conda build --override-channels -c intel -c conda-forge --numpy=1.17 --output-folder=. conda-recipe
displayName: conda build
- task: CopyFiles@2
inputs:
SourceFolder: 'C:\Miniconda\envs\CB\pkgs\'
Contents: 'daal4py*'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'daal4py win'
targetPath: '$(Build.ArtifactStagingDirectory)/'
condition: always()