Skip to content

Commit bd76c51

Browse files
authored
Merge pull request #1050 from szadam/adapters_ci_info
Add system info in CI workflows run on self-hosted runners
2 parents a99d1db + 681e607 commit bd76c51

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

.github/scripts/get_system_info.sh

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (C) 2023 Intel Corporation
4+
# Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions.
5+
# See LICENSE.TXT
6+
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+
8+
# get_system_info.sh - Script for printing system info
9+
10+
function check_L0_version {
11+
if command -v dpkg &> /dev/null; then
12+
dpkg -l | grep level-zero && return
13+
fi
14+
15+
if command -v rpm &> /dev/null; then
16+
rpm -qa | grep level-zero && return
17+
fi
18+
19+
if command -v zypper &> /dev/null; then
20+
zypper se level-zero && return
21+
fi
22+
23+
echo "level-zero not installed"
24+
}
25+
26+
function system_info {
27+
echo "**********system_info**********"
28+
cat /etc/os-release | grep -oP "PRETTY_NAME=\K.*"
29+
cat /proc/version
30+
echo "**********SYCL-LS**********"
31+
source /opt/intel/oneapi/setvars.sh
32+
sycl-ls
33+
echo "**********VGA**********"
34+
lspci | grep VGA
35+
echo "**********CUDA Version**********"
36+
if command -v nvidia-smi &> /dev/null; then
37+
nvidia-smi
38+
else
39+
echo "CUDA not installed"
40+
fi
41+
echo "**********L0 Version**********"
42+
check_L0_version
43+
echo "**********ROCm Version**********"
44+
if command -v rocminfo &> /dev/null; then
45+
rocminfo
46+
else
47+
echo "ROCm not installed"
48+
fi
49+
echo "**********/proc/cmdline**********"
50+
cat /proc/cmdline
51+
echo "**********CPU info**********"
52+
lscpu
53+
echo "**********/proc/meminfo**********"
54+
cat /proc/meminfo
55+
echo "**********build/bin/urinfo**********"
56+
$(dirname "$(readlink -f "$0")")/../../build/bin/urinfo || true
57+
echo "******OpenCL*******"
58+
# The driver version of OpenCL Graphics is the compute-runtime version
59+
clinfo || echo "OpenCL not installed"
60+
echo "**********list-environment**********"
61+
echo "PATH=$PATH"
62+
echo
63+
echo "CPATH=$CPATH"
64+
echo
65+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
66+
echo
67+
echo "LIBRARY_PATH=$LIBRARY_PATH"
68+
echo
69+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
70+
echo
71+
echo "******list-build-system-versions*******"
72+
gcc --version 2>/dev/null || true
73+
echo
74+
clang --version 2>/dev/null || true
75+
echo
76+
make --version 2>/dev/null || true
77+
echo "**********/proc/modules**********"
78+
cat /proc/modules
79+
echo "***************installed-packages***************"
80+
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
81+
zypper se --installed-only 2>/dev/null || true
82+
apt list --installed 2>/dev/null || true
83+
yum list installed 2>/dev/null || true
84+
}
85+
86+
# Call the function above to print system info.
87+
system_info

.github/workflows/cmake.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ jobs:
222222
working-directory: ${{github.workspace}}/build
223223
run: env UR_CTS_ADAPTER_PLATFORM="${{matrix.adapter.platform}}" ctest -C ${{matrix.build_type}} --output-on-failure -L "conformance" --timeout 180
224224

225+
- name: Get information about platform
226+
if: ${{ always() }}
227+
run: .github/scripts/get_system_info.sh
228+
225229
examples-build-hw:
226230
name: Build - examples on HW
227231
if: github.repository == 'oneapi-src/unified-runtime' # run only on upstream; forks won't have the HW
@@ -274,6 +278,10 @@ jobs:
274278
cat ${HOME}/.profile || true
275279
rm ${HOME}/.profile || true
276280
281+
- name: Get information about platform
282+
if: ${{ always() }}
283+
run: .github/scripts/get_system_info.sh
284+
277285
windows-build:
278286
name: Build - Windows
279287
strategy:

0 commit comments

Comments
 (0)