diff --git a/.automation_scripts/pytorch-unit-test-scripts/auto_classify_skip_reasons.py b/.automation_scripts/pytorch-unit-test-scripts/auto_classify_skip_reasons.py index cf948495ec04e..6c6b6f62561f6 100644 --- a/.automation_scripts/pytorch-unit-test-scripts/auto_classify_skip_reasons.py +++ b/.automation_scripts/pytorch-unit-test-scripts/auto_classify_skip_reasons.py @@ -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", @@ -110,6 +119,31 @@ "file": r"^test_nn$", "msg": r"skipIfRocm.*doesn't currently work"}, + # --- Linalg: hipSOLVER xgeev requires ROCm >= 7.14 (linalg.eig via xgeev, pytorch#188720) --- + {"reason": "Linalg", + "msg": r"hipSOLVER xgeev"}, + # --- Linalg: ROCm 6.4 regression on linalg ops (householder/decomp) --- + {"reason": "Linalg", + "msg": r"regression in ROCm 6\.4"}, + + # --- Profiler: CUPTI-dependent profiler tests (libcupti / cupti-python) --- + {"reason": "Profiler", + "msg": r"(?i)cupti"}, + + # --- block_table: ROCm does not support paged-KV block_table (varlen attention) --- + {"reason": "block_table", + "msg": r"ROCm does not support block_table"}, + + # --- explicit NVIDIA test: CUDA / SM-gated tests skipped on ROCm --- + {"reason": "explicit NVIDIA test", + "msg": r"only supported on NVIDIA CUDA"}, + {"reason": "explicit NVIDIA test", + "msg": r"^CUDA-only$"}, + {"reason": "explicit NVIDIA test", + "msg": r"requires CUDA SM80"}, + {"reason": "explicit NVIDIA test", + "msg": r"CUTLASS.*CUDA-only"}, + # --- hipSolver/Magma: skipCUDAIfRocm in test_ops for ldl_solve, scaled_dot_product, conv_transpose3d --- {"reason": "hipSolver/Magma", "msg": r"skipCUDAIfRocm.*doesn't currently work", @@ -433,6 +467,11 @@ {"reason": "Misc", "msg": r"test skipped on \('gfx"}, + # Misc: generic skipIfRocm pointing at a tracked GitHub issue (no specific + # category; heterogeneous inductor/varlen tests) + {"reason": "Misc", + "msg": r"skipIfRocm: https?://"}, + # cuFFT-specific {"reason": "Misc", "msg": r"cuFFT-specific"}, diff --git a/.automation_scripts/pytorch-unit-test-scripts/detect_log_failures.py b/.automation_scripts/pytorch-unit-test-scripts/detect_log_failures.py index b563fcf74bc1e..2b456f5954676 100755 --- a/.automation_scripts/pytorch-unit-test-scripts/detect_log_failures.py +++ b/.automation_scripts/pytorch-unit-test-scripts/detect_log_failures.py @@ -39,10 +39,19 @@ RE_INDIVIDUAL_TEST = re.compile( r"(?P\S+\.py::(?P\w+)::(?P\w+))" ) -RE_INDIV_PASSED = re.compile( - r"(?:test/)?(?P\S+\.py)::(?P\w+)::(?P\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[^\]]*)\]" +) +RE_FLAKY_ENTRY = re.compile( + r"['\"](?:test/)?(?P\S+?\.py)::(?P\w+)::(?P[^'\"]+?)['\"]" ) -RE_NEW_PROCESS_SUCCESS = re.compile(r"Test succeeded in new process") CRASH_PATTERNS = [ (re.compile(r"Segmentation fault", re.IGNORECASE), "SEGFAULT"), @@ -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