Files
TheRock/compiler/amd-llvm/llvm/utils/release/findRegressions-nightly.py
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

135 lines
3.5 KiB
Python
Executable File

#!/usr/bin/env python
from __future__ import print_function
import re, string, sys, os, time
DEBUG = 0
testDirName = "llvm-test"
test = ["compile", "llc", "jit", "cbe"]
exectime = [
"llc-time",
"jit-time",
"cbe-time",
]
comptime = ["llc", "jit-comptime", "compile"]
(tp, exp) = ("compileTime_", "executeTime_")
def parse(file):
f = open(file, "r")
d = f.read()
# Cleanup weird stuff
d = re.sub(r",\d+:\d", "", d)
r = re.findall(r"TEST-(PASS|FAIL|RESULT.*?):\s+(.*?)\s+(.*?)\r*\n", d)
test = {}
fname = ""
for t in r:
if DEBUG:
print(t)
if t[0] == "PASS" or t[0] == "FAIL":
tmp = t[2].split(testDirName)
if DEBUG:
print(tmp)
if len(tmp) == 2:
fname = tmp[1].strip("\r\n")
else:
fname = tmp[0].strip("\r\n")
if fname not in test:
test[fname] = {}
for k in test:
test[fname][k] = "NA"
test[fname][t[1]] = t[0]
if DEBUG:
print(test[fname][t[1]])
else:
try:
n = t[0].split("RESULT-")[1]
if DEBUG:
print(n)
if n == "llc" or n == "jit-comptime" or n == "compile":
test[fname][tp + n] = float(t[2].split(" ")[2])
if DEBUG:
print(test[fname][tp + n])
elif n.endswith("-time"):
test[fname][exp + n] = float(t[2].strip("\r\n"))
if DEBUG:
print(test[fname][exp + n])
else:
print("ERROR!")
sys.exit(1)
except:
continue
return test
# Diff results and look for regressions.
def diffResults(d_old, d_new):
for t in sorted(d_old.keys()):
if DEBUG:
print(t)
if t in d_new:
# Check if the test passed or failed.
for x in test:
if x in d_old[t]:
if x in d_new[t]:
if d_old[t][x] == "PASS":
if d_new[t][x] != "PASS":
print(t + " *** REGRESSION (" + x + ")\n")
else:
if d_new[t][x] == "PASS":
print(t + " * NEW PASS (" + x + ")\n")
else:
print(t + "*** REGRESSION (" + x + ")\n")
# For execution time, if there is no result, its a fail.
for x in exectime:
if tp + x in d_old[t]:
if tp + x not in d_new[t]:
print(t + " *** REGRESSION (" + tp + x + ")\n")
else:
if tp + x in d_new[t]:
print(t + " * NEW PASS (" + tp + x + ")\n")
for x in comptime:
if exp + x in d_old[t]:
if exp + x not in d_new[t]:
print(t + " *** REGRESSION (" + exp + x + ")\n")
else:
if exp + x in d_new[t]:
print(t + " * NEW PASS (" + exp + x + ")\n")
else:
print(t + ": Removed from test-suite.\n")
# Main
if len(sys.argv) < 3:
print("Usage:", sys.argv[0], "<old log> <new log>")
sys.exit(-1)
d_old = parse(sys.argv[1])
d_new = parse(sys.argv[2])
diffResults(d_old, d_new)