Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
a7efa37
[CI] Parity: support sha=latest by resolving the latest green run on …
ethanwee1 Jul 6, 2026
5d7a6dc
[CI] Parity auto-trigger: open up mi300/mi200/navi31 collection
ethanwee1 Jul 7, 2026
c41847f
[CI] Parity: derive ROCm shard count from the resolved workflow
ethanwee1 Jul 7, 2026
a64959b
parity summary: count a disagreement only when CUDA PASSED
ethanwee1 Jun 24, 2026
78dbc6a
parity summary: add regex-filtered HUD link for the report commit
ethanwee1 Jun 24, 2026
756a3e4
parity: carry commit SHA labels through log + running-time parsing
ethanwee1 Jun 23, 2026
6f7a76c
summarize_xml: make printed summary labels follow set1/set2 naming
ethanwee1 Jun 24, 2026
fad66b2
[CI] Parity: add rocm-preview arch
ethanwee1 Jul 7, 2026
7e5f914
[CI] Parity: classify conv2d_backward ROCm skip as PT2.0 - Convolution
ethanwee1 Jul 8, 2026
cd78281
[CI] Parity: enable auto_classify by default
ethanwee1 Jul 8, 2026
502b08a
[CI] Parity: fold CUDA distributed-test split (pytorch#189232) into d…
ethanwee1 Jul 14, 2026
0c9facb
[CI] Parity: fix flaky-test misattribution in log-based detection
ethanwee1 Jul 13, 2026
edb53c9
[CI] Parity: fold distributed split in running-time report too
ethanwee1 Jul 14, 2026
68906cd
[CI] Parity: still generate + upload report on partial download, flag…
ethanwee1 Jul 14, 2026
9edbc73
[CI] Parity: skip a missing ROCm/CUDA test config instead of aborting…
ethanwee1 Jul 15, 2026
b832c6b
[CI] Parity: ignore rerun_disabled_tests / mem_leak_check variant jobs
ethanwee1 Jul 15, 2026
579ba57
[CI] Parity: read ROCm inductor from canonical trunk run (avoid perio…
ethanwee1 Jul 15, 2026
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
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@
# TIER 1: High-specificity combined rules (message + file/class)
# ==================================================================

# --- PT2.0 - Convolution: conv2d backward parametrized skipped on ROCm ---
# skipIfRocmArch(...) skips test_conv2d_backward_parametrized (see upstream
# #188671, CI timeout). Categorize it as a convolution issue rather than the
# generic Misc "test skipped on ('gfx...')" bucket below. Must precede that
# Misc arch rule.
{"reason": "PT2.0 - Convolution",
"msg": r"test skipped on \('gfx",
"name": r"(?i)conv2d_backward"},

# --- bfloat16_SDPA_ME: dropout mask in test_transformers with bfloat16 in TEST NAME ---
# Must be before generic SDPA_ME rule
{"reason": "bfloat16_SDPA_ME",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,19 @@
RE_INDIVIDUAL_TEST = re.compile(
r"(?P<test_path>\S+\.py::(?P<cls>\w+)::(?P<method>\w+))"
)
RE_INDIV_PASSED = re.compile(
r"(?:test/)?(?P<file>\S+\.py)::(?P<cls>\w+)::(?P<method>\S+?)\s+PASSED"
# PyTorch's run_test.py prints an authoritative summary at the end of a shard
# listing the exact tests that failed and then passed on rerun-in-new-process,
# e.g.
# The following tests failed and then succeeded when run in a new process
# ['test/inductor/test_compiled_autograd.py::Cls::test_jacfwd', ...]
# We parse this directly instead of guessing from nearby PASSED lines, which
# misattributes flakiness to whatever test happened to pass most recently.
RE_FLAKY_SUMMARY = re.compile(
r"The following tests failed and then succeeded when run in a new process\s*\[(?P<tests>[^\]]*)\]"
)
RE_FLAKY_ENTRY = re.compile(
r"['\"](?:test/)?(?P<file>\S+?\.py)::(?P<cls>\w+)::(?P<method>[^'\"]+?)['\"]"
)
RE_NEW_PROCESS_SUCCESS = re.compile(r"Test succeeded in new process")

CRASH_PATTERNS = [
(re.compile(r"Segmentation fault", re.IGNORECASE), "SEGFAULT"),
Expand All @@ -69,13 +78,23 @@


def classify_log_file(filename):
"""Return (platform, test_config, shard_num) from a log filename like rocm3.txt."""
"""Return (platform, test_config, shard_num) from a log filename like rocm3.txt.

Commit-vs-commit parity prefixes log files with the short commit SHA
(for example, 09e0c59b_rocm3.txt). In that mode the SHA label is the
platform name used by generate_summary.py, so preserve it here.
"""
stem = Path(filename).stem
label = None
m = re.match(r"(?P<label>[0-9a-f]{8,40})_(?P<stem>.+)", stem)
if m:
label = m.group("label")[:8]
stem = m.group("stem")
for prefix, (platform, test_config) in sorted(LOG_FILE_MAP.items(), key=lambda x: -len(x[0])):
if stem.startswith(prefix):
remainder = stem[len(prefix):]
if remainder.isdigit():
return platform, test_config, int(remainder)
return label or platform, test_config, int(remainder)
return None, None, None


Expand All @@ -101,16 +120,16 @@ def parse_log_file(filepath):
and flaky tests.

A flaky test is one that failed in its normal-process run but PASSED when the
CI harness re-ran it alone in a new subprocess (indicated by a PASSED line
for the specific test::class::method, followed by 'Test succeeded in new
process, continuing with the rest of the tests').
CI harness re-ran it alone in a new subprocess. These are read from the
authoritative summary run_test.py prints for each shard ('The following
tests failed and then succeeded when run in a new process[...]'), which
names the exact tests.
"""
results = {}
current_test = None
last_failed_test = None
consistent_failures = []
flaky_tests = []
last_passed_individual = None
first_ts = None
last_ts = None

Expand Down Expand Up @@ -244,34 +263,27 @@ def parse_log_file(filepath):
shard_str = f"{info['shard']}/{info['total']}"
consistent_failures.append((m.group("test_path"), shard_str))

# Detect individual PASSED lines for flaky-rerun tracking.
m = RE_INDIV_PASSED.search(stripped)
# A test is flaky when it failed in its normal-process run but
# PASSED on rerun-in-a-new-process. run_test.py prints an
# authoritative summary naming exactly those tests; parse it
# directly rather than guessing from the most recent PASSED line
# (which misattributes flakiness to an unrelated test that merely
# happened to pass just before the rerun marker).
m = RE_FLAKY_SUMMARY.search(stripped)
if m:
last_passed_individual = {
"file": m.group("file"),
"cls": m.group("cls"),
"method": m.group("method"),
"active": active,
}

# When we see 'Test succeeded in new process' after a PASSED
# individual test, that test was originally failing in the main
# process (CI only falls back to rerun-in-new-process for tests
# that crashed or failed) but passed on retry -> flaky.
if RE_NEW_PROCESS_SUCCESS.search(stripped) and last_passed_individual:
lp = last_passed_individual
lp_active = lp.get("active")
test_shard = ""
if lp_active and lp_active in results:
info = results[lp_active]
test_shard = f"{info['shard']}/{info['total']}"
flaky_tests.append({
"file": lp["file"],
"cls": lp["cls"],
"method": lp["method"],
"test_shard": test_shard,
})
last_passed_individual = None
for em in RE_FLAKY_ENTRY.finditer(m.group("tests")):
f_file = em.group("file")
test_shard = ""
for info in results.values():
if info["test_file"] and f_file == info["test_file"] + ".py":
test_shard = f"{info['shard']}/{info['total']}"
break
flaky_tests.append({
"file": f_file,
"cls": em.group("cls"),
"method": em.group("method"),
"test_shard": test_shard,
})

if active and active in results:
for pattern, label in CRASH_PATTERNS:
Expand Down
Loading