Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Set `GB_COOLDOWN_CMD` to a script to run before each chunk, for example one that

For a short functional run, set `GB_WARMUP_MS=20 GB_RUNS=1 GB_RUN_MS=40 GB_TIMED_RUNS=1`. Keep those results separate from measured runs.

The optional [GL/GLES executor](suite/gl/README.md) runs matched render and compute workloads through headless EGL. Build with `-DGB_BUILD_GL=ON`; use `MESA_LOADER_DRIVER_OVERRIDE=asahi` or `zink` to select the Mesa GL driver.
The optional [GL/GLES executor](suite/gl/README.md) runs matched render and compute workloads through headless EGL. Build with `-DGB_BUILD_GL=ON`; use `MESA_LOADER_DRIVER_OVERRIDE=aurora` or `zink` to select the Mesa GL driver.

## Layout

Expand Down
2 changes: 1 addition & 1 deletion records/SCHEMA.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ records/<device>/<os>/<date>-<id>/
| `os_version` | string | `/etc/os-release` PRETTY_NAME, or `sw_vers` product version |
| `os_build` | string | macOS build (`sw_vers -buildVersion`), `null` on Linux |
| `kernel` | string | `uname -r` (Linux), `uname -v` (macOS) |
| `kernel_module` | object | Linux: `{"name": "aurora", "build_id": "...", "srcversion": "...", "params": {...}}` (`asahi` on kernels before the rename) |
| `kernel_module` | object | Linux: `{"name": "aurora", "build_id": "...", "srcversion": "...", "params": {...}}` (`asahi` on kernels before the rename; accepted until 2027-02-28, LEGACY-ASAHI(2027-02-28)) |
| `driver` | object | from the executor `--info`: `name`, `info` (driver info string), `version`, `api_version`, `mesa_sha` (Linux) |
| `gpu` | object | `name`, `cores` when known, `family` |
| `firmware` | string | GPU firmware version when visible, else `null` |
Expand Down
7 changes: 4 additions & 3 deletions rt/tools/run-record.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,18 @@ mv "$D/results.jsonl.log" "$D/log.txt" 2>/dev/null
[ -n "${PM:-}" ] && sudo -n kill "$PM" 2>/dev/null
S1=$(state)
CHUNKS=$(grep -v '^[[:space:]]*#' "$PLAN" | awk 'NF >= 3 && $2 == "rt" { print $1 }' | uniq | grep -E "$RE" | awk 'BEGIN { ORS = "" } { if (NR > 1) print ","; print "\"" $1 "\"" }')
ENVJ=$(env | grep -E '^(VK_DRIVER_FILES|VK_ICD_FILENAMES|MESA_|HK_|AGX_|ASAHI_)' | sed -e 's/"/\\"/g' -e 's/^\([^=]*\)=\(.*\)$/"\1":"\2"/' | awk 'BEGIN { ORS = "" } { if (NR > 1) print ","; print }')
ENVJ=$(env | grep -E '^(VK_DRIVER_FILES|VK_ICD_FILENAMES|MESA_|HK_|AGX_|AURORA_|ASAHI_)' | sed -e 's/"/\\"/g' -e 's/^\([^=]*\)=\(.*\)$/"\1":"\2"/' | awk 'BEGIN { ORS = "" } { if (NR > 1) print ","; print }')
if [ "$OS" = macos ]; then
KMOD=null; HEALTH=null; FW=null
else
# The GPU kernel module: aurora, or asahi on kernels before the rename.
# The GPU kernel module: aurora. LEGACY-ASAHI(2027-02-28): asahi on kernels before the rename.
# ASAHI_ above is the pre-rename Mesa environment prefix, same tag.
km=aurora; [ -d /sys/module/aurora ] || km=asahi
bid=$(modinfo -F srcversion $km 2>/dev/null); par=""
for f in /sys/module/$km/parameters/*; do [ -r "$f" ] && par="$par${par:+,}\"$(basename "$f")\":\"$(cat "$f" 2>/dev/null)\""; done
bidf=$(readelf -n "$(modinfo -n $km 2>/dev/null)" 2>/dev/null | awk '/Build ID/ { print $3; exit }')
KMOD="{\"name\":\"$km\",\"build_id\":\"$bidf\",\"srcversion\":\"$bid\",\"params\":{$par}}"
KL=$(journalctl -k -b --since "@$T0" 2>/dev/null | grep -i -E 'aurora|asahi|agx|gpu|drm|fault|timeout' | tail -40 | esc)
KL=$(journalctl -k -b --since "@$T0" 2>/dev/null | grep -i -E 'aurora|agx|gpu|drm|fault|timeout' | tail -40 | esc)
alive=false; pgrep -x Hyprland > /dev/null && alive=true
HEALTH="{\"kernel_log\":\"$KL\",\"desktop_alive\":$alive}"
FW=null
Expand Down
2 changes: 1 addition & 1 deletion stress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ the run exits with status 2. The default patterns are generic for Linux DRM driv
```
\b(gpu|drm)\b.*(hang|hung|time ?out|timed out|reset|recover|lost|crash|fault|wedged)
\[drm(:[^]]*)?\] \*error\*
\b(amdgpu|radeon|i915|xe|nouveau|msm|freedreno|panfrost|panthor|lima|v3d|vc4|etnaviv|powervr|aurora|asahi)\b.*(error|fail|fault|time ?out|timed out|hang|reset|lost|crash)
\b(amdgpu|radeon|i915|xe|nouveau|msm|freedreno|panfrost|panthor|lima|v3d|vc4|etnaviv|powervr|aurora)\b.*(error|fail|fault|time ?out|timed out|hang|reset|lost|crash)
firmware.*(crash|hang|time ?out|timed out)
\b(etimedout|device lost)\b
\b(oops|kernel bug|bug:|unable to handle kernel|general protection fault|use-after-free|kasan)
Expand Down
2 changes: 1 addition & 1 deletion stress/src/klog.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
static const char *const default_patterns[] = {
"\\b(gpu|drm)\\b.*(hang|hung|time ?out|timed out|reset|recover|lost|crash|fault|wedged)",
"\\[drm(:[^]]*)?\\] \\*error\\*",
"\\b(amdgpu|radeon|i915|xe|nouveau|msm|freedreno|panfrost|panthor|lima|v3d|vc4|etnaviv|powervr|aurora|asahi)\\b.*"
"\\b(amdgpu|radeon|i915|xe|nouveau|msm|freedreno|panfrost|panthor|lima|v3d|vc4|etnaviv|powervr|aurora)\\b.*"
"(error|fail|fault|time ?out|timed out|hang|reset|lost|crash)",
"firmware.*(crash|hang|time ?out|timed out)",
"\\b(etimedout|device lost)\\b",
Expand Down
2 changes: 1 addition & 1 deletion suite/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# gpubench standard suite

A small, fixed set of GPU benchmarks for the Linux driver stack (Mesa hk, the
drm/asahi kernel driver and the GPU firmware interface), each with a Vulkan
drm/aurora kernel driver and the GPU firmware interface), each with a Vulkan
executor (Linux) and a Metal executor (macOS) that do the same work with the
same dimensions and the same timing method.

Expand Down
6 changes: 3 additions & 3 deletions suite/gl/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Headless GL/GLES executor

`gpubench-gl` measures the standard suite's render and compute workloads through
EGL. Use the same binary with `MESA_LOADER_DRIVER_OVERRIDE=asahi` and `zink` to
EGL. Use the same binary with `MESA_LOADER_DRIVER_OVERRIDE=aurora` and `zink` to
compare native GL with GL over Vulkan. The requested override and the actual
GL renderer, vendor, version, capabilities, and suite revision are included in
`--info` and every result. Check the renderer before accepting a measurement;
Expand Down Expand Up @@ -96,9 +96,9 @@ for hardware measurements. Keep all API, size, depth, and timing arguments
identical between the two driver runs.

```sh
# Writes new directories asahi/ and zink/ under a new output directory.
# Writes new directories aurora/ and zink/ under a new output directory.
tools/run-gl-pair.sh gl-pair
python3 tools/compare.py gl-pair/asahi gl-pair/zink \
python3 tools/compare.py gl-pair/aurora gl-pair/zink \
--labels native-GL,Zink --metric us_per_submit --out gl-pair/comparison.md
```

Expand Down
2 changes: 1 addition & 1 deletion tools/compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def describe(meta, label):
bits = [meta.get("device", "?"), meta.get("os", "?"), meta.get("os_version", "")]
if meta.get("os") == "linux":
km = meta.get("kernel_module") or {}
bits += [f"kernel {meta.get('kernel')}", f"{km.get('name') or 'asahi'}.ko {str(km.get('build_id') or '?')[:12]}",
bits += [f"kernel {meta.get('kernel')}", f"{km.get('name') or 'aurora'}.ko {str(km.get('build_id') or '?')[:12]}",
f"Mesa {meta.get('mesa_sha')}"]
else:
bits += [f"build {meta.get('os_build')}"]
Expand Down
2 changes: 1 addition & 1 deletion tools/lib-meta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobj() {
env_json() { # driver-relevant environment
local first=1 k
printf '{'
for k in $(env | grep -E '^(VK_DRIVER_FILES|VK_ICD_FILENAMES|MESA_[A-Z0-9_]*|HK_[A-Z0-9_]*|AGX_[A-Z0-9_]*|ASAHI_[A-Z0-9_]*|GB_[A-Z0-9_]*|MTL_[A-Z0-9_]*)=' | cut -d= -f1 | sort -u); do
for k in $(env | grep -E '^(VK_DRIVER_FILES|VK_ICD_FILENAMES|MESA_[A-Z0-9_]*|HK_[A-Z0-9_]*|AGX_[A-Z0-9_]*|AURORA_[A-Z0-9_]*|ASAHI_[A-Z0-9_]*|GB_[A-Z0-9_]*|MTL_[A-Z0-9_]*)=' | cut -d= -f1 | sort -u); do
[ $first = 1 ] || printf ','; first=0
printf '"%s":%s' "$k" "$(jstr "$(printenv "$k")")"
done
Expand Down
2 changes: 1 addition & 1 deletion tools/performance-gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def qualification_errors(record):
digest = lambda value: isinstance(value, str) and re.fullmatch(r'[0-9a-f]{64}', value)
if not isinstance(module_id, str) or not re.fullmatch(r'[0-9a-f]{40}', module_id):
errors.append('Linux module build ID is missing or malformed')
# The GPU module is aurora, or asahi on kernels before the rename.
# The GPU module is aurora. LEGACY-ASAHI(2027-02-28): records from kernels before the rename name it asahi.
if not isinstance(module, dict) or module.get('name') not in ('aurora', 'asahi'):
errors.append('Linux stack does not identify the GPU kernel module (aurora)')
if not commit(meta.get('mesa_sha')) or not digest(meta.get('mesa_sha256')):
Expand Down
2 changes: 1 addition & 1 deletion tools/run-gl-pair.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exe=${GB_GL_BIN:-build/bin/gpubench-gl}
mkdir "$out"
gles=
if [ "${GB_GL_GLES:-0}" = 1 ]; then gles=--gles; fi
for driver in asahi zink; do
for driver in aurora zink; do
dir=$out/$driver
mkdir "$dir"
export MESA_LOADER_DRIVER_OVERRIDE=$driver
Expand Down
10 changes: 5 additions & 5 deletions tools/run-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ state_json() {
printf '},"loadavg":%s}' "$(jstr "$(cat /proc/loadavg)")"
}

module_json() { # the GPU kernel module: aurora, or asahi on kernels before the rename
module_json() { # the GPU kernel module: aurora (LEGACY-ASAHI(2027-02-28): asahi on kernels before the rename)
local m=/sys/module/aurora f bid="" first=1
[ -d "$m" ] || m=/sys/module/asahi
[ -d "$m" ] || { printf null; return; }
Expand All @@ -81,13 +81,13 @@ module_json() { # the GPU kernel module: aurora, or asahi on kernels before the

gpu_log() { # kernel log lines since the run started that point at GPU trouble
journalctl -k --since "@$T0" --no-pager -q 2>/dev/null |
grep -iE 'aurora|asahi|agx|drm' | grep -iE 'GPU fault|page fault|crashed|runtime stopped|client failed|timed out|timeout|still draining|queued-failure|hang|recover' || true
grep -iE 'aurora|agx|drm' | grep -iE 'GPU fault|page fault|crashed|runtime stopped|client failed|timed out|timeout|still draining|queued-failure|hang|recover' || true
}

gpu_notes() { # other GPU driver lines worth keeping with the record (do not stop the run)
journalctl -k --since "@$T0" --no-pager -q 2>/dev/null | grep -iE 'aurora|asahi|agx' |
journalctl -k --since "@$T0" --no-pager -q 2>/dev/null | grep -iE 'aurora|agx' |
grep -viE 'GPU fault|page fault|crashed|runtime stopped|client failed|timed out|timeout|still draining|queued-failure|hang|recover' |
sed -E 's/^.*(aurora|asahi|agx)/\1/I; s/[0-9]{4,}/N/g' | sort | uniq -c | sort -rn | head -20 || true
sed -E 's/^.*(aurora|agx)/\1/I; s/[0-9]{4,}/N/g' | sort | uniq -c | sort -rn | head -20 || true
}

desktop_alive() {
Expand Down Expand Up @@ -126,7 +126,7 @@ for c in $SEL; do
fi
done
STATE_AFTER=$(state_json)
FW=$(journalctl -k -b --no-pager -q 2>/dev/null | grep -iE '(aurora|asahi).*(firmware|fw).*version|firmware version' | tail -1 | sed 's/.*\(irmware\|fw\)[^0-9]*//I' | cut -c1-40)
FW=$(journalctl -k -b --no-pager -q 2>/dev/null | grep -iE 'aurora.*(firmware|fw).*version|firmware version' | tail -1 | sed 's/.*\(irmware\|fw\)[^0-9]*//I' | cut -c1-40)
OSV=$(. /etc/os-release 2>/dev/null; echo "${PRETTY_NAME:-linux}")
GPU_NAME=$(printf '%s' "$INFO" | sed -n 's/.*"device_name":"\([^"]*\)".*/\1/p')
SUITE_SHA=$(cat "$BIN/SUITE_SHA" 2>/dev/null || git -C "$ROOT" describe --always --dirty=+dirty --abbrev=7 2>/dev/null || echo unknown)
Expand Down
3 changes: 2 additions & 1 deletion tools/tests/test_performance_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def metadata(os):
files={name: 'e' * 64 for name in ('suite-plan.txt', 'rt-plan.txt',
'gpubench-vk', 'gpubench-rt-vk', 'full-performance-baseline.py')})
meta.update(date_utc='2026-10-24T00:00:00Z', kernel='test-kernel',
kernel_module=dict(name='asahi', build_id=assets['module_build_id']),
kernel_module=dict(name='aurora', build_id=assets['module_build_id']),
mesa_sha=assets['mesa_source'], mesa_sha256=assets['mesa_sha256'],
rt_source=assets['rt_source'], assets_manifest=assets,
health=dict(completed=True, desktop_alive=True, new_fault_lines=0),
Expand Down Expand Up @@ -185,6 +185,7 @@ def test_numeric_comparison_does_not_claim_unknown_or_failed_stack_eligible(self
self.assertFalse(ledger['passed'])

def test_both_gpu_module_names_identify_the_stack(self):
# LEGACY-ASAHI(2027-02-28): records from kernels before the rename name the module asahi.
for name, eligible in (('aurora', True), ('asahi', True), ('panfrost', False)):
with self.subTest(name=name):
meta = metadata('linux')
Expand Down
Loading