Skip to content

Commit d831bab

Browse files
authored
CI Update ICC install commands (scikit-learn#19329)
1 parent 4fd851c commit d831bab

File tree

7 files changed

+51
-28
lines changed

7 files changed

+51
-28
lines changed

.travis.yml

-6
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,6 @@ env:
3030

3131
jobs:
3232
include:
33-
- python: 3.7
34-
env:
35-
- CHECK_WARNING=true
36-
- BUILD_WITH_ICC=true
37-
if: type = cron OR commit_message =~ /\[icc-build\]/
38-
3933
# Manual trigger of linux/arm64 tests in PR without triggering the full
4034
# wheel building process for all the Python versions.
4135
- python: 3.9

azure-pipelines.yml

+22
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,28 @@ jobs:
7878
# Here we make sure, that they are still run on a regular basis.
7979
SKLEARN_SKIP_NETWORK_TESTS: '0'
8080

81+
# Check compilation with intel C++ compiler (ICC)
82+
- template: build_tools/azure/posix.yml
83+
parameters:
84+
name: Linux_Nightly_ICC
85+
vmImage: ubuntu-18.04
86+
dependsOn: [git_commit, linting]
87+
condition: |
88+
and(
89+
succeeded(),
90+
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
91+
or(eq(variables['Build.Reason'], 'Schedule'),
92+
contains(dependencies['git_commit']['outputs']['commit.message'], '[icc-build]')
93+
)
94+
)
95+
matrix:
96+
pylatest_conda_mkl:
97+
DISTRIB: 'conda'
98+
PYTHON_VERSION: '*'
99+
BLAS: 'mkl'
100+
COVERAGE: 'false'
101+
BUILD_WITH_ICC: 'true'
102+
81103
# Will run all the time regardless of linting outcome.
82104
- template: build_tools/azure/posix.yml
83105
parameters:

build_tools/azure/install.sh

+14
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,20 @@ if [[ "$DISTRIB" == "conda-pip-latest" ]]; then
148148
# environment:
149149
pip install --verbose --editable .
150150
else
151+
if [[ "$BUILD_WITH_ICC" == "true" ]]; then
152+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
153+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
154+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
155+
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
156+
sudo apt-get update
157+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
158+
source /opt/intel/oneapi/setvars.sh
159+
160+
# The "build_clib" command is implicitly used to build "libsvm-skl".
161+
# To compile with a different compiler, we also need to specify the
162+
# compiler for this command
163+
python setup.py build_ext --compiler=intelem -i build_clib --compiler=intelem
164+
fi
151165
# Use the pre-installed build dependencies and build directly in the
152166
# current environment.
153167
python setup.py develop

build_tools/azure/test_docs.sh

+4
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,8 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
88
source $VIRTUALENV/bin/activate
99
fi
1010

11+
if [[ "$BUILD_WITH_ICC" == "true" ]]; then
12+
source /opt/intel/oneapi/setvars.sh
13+
fi
14+
1115
make test-doc

build_tools/azure/test_script.sh

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ elif [[ "$DISTRIB" == "ubuntu" ]] || [[ "$DISTRIB" == "ubuntu-32" ]]; then
88
source $VIRTUALENV/bin/activate
99
fi
1010

11+
if [[ "$BUILD_WITH_ICC" == "true" ]]; then
12+
source /opt/intel/oneapi/setvars.sh
13+
fi
14+
1115
python --version
1216
python -c "import numpy; print('numpy %s' % numpy.__version__)"
1317
python -c "import scipy; print('scipy %s' % scipy.__version__)"

build_tools/travis/install_main.sh

+1-17
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,7 @@ python --version
6262
python -c "import numpy; print(f'numpy {numpy.__version__}')"
6363
python -c "import scipy; print(f'scipy {scipy.__version__}')"
6464

65-
if [[ $BUILD_WITH_ICC == true ]]; then
66-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
67-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
68-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
69-
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
70-
sudo apt-get update
71-
sudo apt-get install intel-oneapi-icc
72-
source /opt/intel/oneapi/setvars.sh
73-
74-
# The "build_clib" command is implicitly used to build "libsvm-skl".
75-
# To compile with a different compiler, we also need to specify the
76-
# compiler for this command
77-
python setup.py build_ext --compiler=intelem -i build_clib --compiler=intelem
78-
else
79-
pip install -e .
80-
fi
81-
65+
pip install -e .
8266
python setup.py develop
8367

8468
ccache --show-stats

doc/developers/advanced_installation.rst

+6-5
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,9 @@ repository:
479479

480480
.. prompt:: bash $
481481

482-
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
483-
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
484-
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
482+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
483+
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
484+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
485485

486486
Then, add the oneAPI repository to your APT repositories:
487487

@@ -490,11 +490,12 @@ Then, add the oneAPI repository to your APT repositories:
490490
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
491491
sudo apt-get update
492492

493-
Install ICC, packaged under the name ``intel-oneapi-icc``:
493+
Install ICC, packaged under the name
494+
``intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic``:
494495

495496
.. prompt:: bash $
496497

497-
sudo apt-get install intel-oneapi-icc
498+
sudo apt-get install intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic
498499

499500
Before using ICC, you need to set up environment variables:
500501

0 commit comments

Comments
 (0)