Skip to content

Commit af5050f

Browse files
Merge pull request #396 from lukaszstolarczuk/import-gather-sys-info-scripts
Add get_system_info script
2 parents 3d3e827 + 7d44c2c commit af5050f

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

.github/scripts/get_system_info.sh

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
29+
# echo "**********SYCL-LS**********"
30+
# source /opt/intel/oneapi/setvars.sh
31+
# sycl-ls
32+
33+
echo "**********VGA info**********"
34+
lspci | grep -i VGA
35+
36+
# echo "**********CUDA Version**********"
37+
# if command -v nvidia-smi &> /dev/null; then
38+
# nvidia-smi
39+
# else
40+
# echo "CUDA not installed"
41+
# fi
42+
43+
echo "**********L0 Version**********"
44+
check_L0_version
45+
46+
# echo "**********ROCm Version**********"
47+
# if command -v rocminfo &> /dev/null; then
48+
# rocminfo
49+
# else
50+
# echo "ROCm not installed"
51+
# fi
52+
53+
echo "******OpenCL*******"
54+
# The driver version of OpenCL Graphics is the compute-runtime version
55+
clinfo || echo "OpenCL not installed"
56+
57+
echo "**********/proc/cmdline**********"
58+
cat /proc/cmdline
59+
60+
echo "**********CPU info**********"
61+
lscpu
62+
63+
echo "**********/proc/meminfo**********"
64+
cat /proc/meminfo
65+
66+
echo "**********env variables**********"
67+
echo "PATH=${PATH}"
68+
echo "CPATH=${CPATH}"
69+
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
70+
echo "LIBRARY_PATH=${LIBRARY_PATH}"
71+
echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH}"
72+
echo
73+
74+
echo "******build tools versions*******"
75+
gcc --version 2>/dev/null || true
76+
echo
77+
clang --version 2>/dev/null || true
78+
echo
79+
make --version 2>/dev/null || true
80+
echo
81+
cmake --version 2>/dev/null || true
82+
echo
83+
84+
echo "**********/proc/modules**********"
85+
cat /proc/modules
86+
87+
echo "***************all installed packages***************"
88+
# Instructions below will return some minor errors, as they are dependent on the Linux distribution.
89+
zypper se --installed-only 2>/dev/null || true
90+
apt list --installed 2>/dev/null || true
91+
yum list installed 2>/dev/null || true
92+
}
93+
94+
# Call the function above to print system info.
95+
system_info

.github/workflows/gpu.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
- name: Checkout
2828
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2929

30+
- name: Get information about platform
31+
run: .github/scripts/get_system_info.sh
32+
3033
- name: Configure build
3134
run: >
3235
cmake

0 commit comments

Comments
 (0)