Skip to content

Commit 0725417

Browse files
Alexsandrussnapetrov
authored andcommitted
System info output in CI (#1073)
* add system info * fix python activation on win * add system descriptor * fix descriptor calls * fix descriptor calls 2 * fix cpufeature installation on mac * change system descriptor url to oneapi-src/onedal * Add descriptor script * Remove extra variable
1 parent f5cceaf commit 0725417

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.ci/pipeline/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
pool:
4949
vmImage: 'ubuntu-22.04'
5050
steps:
51+
- script: |
52+
bash .ci/scripts/describe_system.sh
53+
displayName: 'System info'
5154
- task: UsePythonVersion@0
5255
displayName: 'Use Python $(python.version)'
5356
inputs:
@@ -125,6 +128,9 @@ jobs:
125128
sudo bash -c 'echo libintelocl.so > /etc/OpenCL/vendors/intel-cpu.icd'
126129
sudo mv -f /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga /opt/intel/oneapi/compiler/latest/linux/lib/oclfpga_
127130
displayName: 'apt-get'
131+
- script: |
132+
bash .ci/scripts/describe_system.sh
133+
displayName: "System info"
128134
- script: |
129135
conda create -q -y -n CB -c conda-forge conda=4.10 python=$(python.version) conda-build=3.21.8 conda-verify
130136
displayName: Create Anaconda environment
@@ -171,6 +177,11 @@ jobs:
171177
conda install -n CB -q --override-channels -c intel dal dal-include
172178
conda install -n CB -q --override-channels -c conda-forge mpich
173179
displayName: Create Anaconda environment
180+
- script: |
181+
source activate CB
182+
pip install -q cpufeature
183+
bash .ci/scripts/describe_system.sh
184+
displayName: "System info"
174185
- script: |
175186
source activate CB
176187
export DALROOT=$CONDA_PREFIX
@@ -205,9 +216,15 @@ jobs:
205216
- script: |
206217
call activate CB
207218
pip install --upgrade setuptools
219+
pip install cpufeature
208220
pip install -r requirements-dev.txt
209221
pip install -r requirements-test.txt
210222
displayName: 'Install requirements'
223+
- script: |
224+
set PATH=C:\msys64\usr\bin;%PATH%
225+
call activate CB
226+
bash .ci/scripts/describe_system.sh
227+
displayName: 'System info'
211228
- script: |
212229
call activate CB
213230
set PREFIX=%CONDA_PREFIX%

.ci/scripts/describe_system.sh

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
#===============================================================================
3+
# Copyright 2022 Intel Corporation
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#===============================================================================
17+
18+
# CPU info
19+
echo "CPU features:"
20+
if [ -x "$(command -v lscpu)" ]; then
21+
lscpu
22+
elif [ "$(pip list | grep cpufeature)" != "" ]; then
23+
python -c "import cpufeature; cpufeature.print_features()"
24+
else
25+
echo "Unable to get CPU features via lscpu or python/cpufeature"
26+
fi
27+
echo
28+
# OS info
29+
echo "Operating system:"
30+
if [ -x "$(command -v uname)" ]; then
31+
uname -a
32+
elif [ -x "$(command -v python)" ]; then
33+
python -c "import platform; print(platform.platform())"
34+
else
35+
echo "Unable to get operating system via uname or python/platform"
36+
fi
37+
echo
38+
# Compilers
39+
echo "Compilers:"
40+
if [ -x "$(command -v gcc)" ]; then
41+
echo "GNU:"
42+
gcc --version
43+
fi
44+
if [ -x "$(command -v clang)" ]; then
45+
echo "Clang:"
46+
clang --version
47+
fi
48+
if [ -x "$(command -v icpx)" ]; then
49+
echo "ICPX:"
50+
icpx --version
51+
fi

0 commit comments

Comments
 (0)