Skip to content

Commit 3147ecf

Browse files
[CI] Add script to gather sys info
Imported from https://github.com/oneapi-src/unified-runtime
1 parent 47ce308 commit 3147ecf

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed

.github/scripts/get_system_info.sh

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

0 commit comments

Comments
 (0)