Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
476d3c1
[release/2.8] Enable wheels
jithunnair-amd Apr 22, 2025
8e6d64f
[release/2.8] Upgrade numpy versions; Use different package versions …
jithunnair-amd Jul 16, 2025
3ff7844
Use ROCm/triton and update triton.txt
jithunnair-amd Jul 16, 2025
fe59c33
Add related_commits file (#2396)
pragupta Jul 22, 2025
14b0f0e
Add QA automation scripts for running PyTorch unit tests
jithunnair-amd Feb 19, 2025
99627b5
[AUTOGENERATED] [release/2.5] [ROCm][layer_norm] Use __builtin_amdgcn…
rocm-mici Dec 18, 2024
275c05b
[release/2.7] Update test_binary_ufuncs.py after numpy upgrade (#2289)
ethanwee1 Jul 1, 2025
214e0f3
Clean up CUDA state between tests (#2335)
rraminen Jul 14, 2025
4361e47
[AUTOGENERATED] [release/2.7] [release/2.6] Fix dtype before comparin…
okakarpa Jul 15, 2025
b324b36
[release/2.8] enable py3.13 (#2366)
ethanwee1 Jul 17, 2025
edcb143
[SWDEV-539076] Initial naive foreach autotune support (#2377)
jataylo Jul 18, 2025
4142eef
[release/2.7] [SWDEV-543214] Reland #2416 Fix warps runtime (#2421)
jataylo Jul 30, 2025
5e67be1
[AUTOGENERATED] [release/2.8] [release/2.7] [SWDEV-543214] Reland #24…
okakarpa Aug 4, 2025
c58ceb1
[AUTOGENERATED] [release/2.8] [SWDEV-539215] - Autotune support for p…
okakarpa Aug 11, 2025
406100f
[SWDEV-539119] [release/2.8] Add fast_tanh support (#2484)
jataylo Aug 12, 2025
fcc0d85
[AUTOGENERATED] [release/2.8] Change triton package name depending on…
dhonnappa-amd Aug 15, 2025
16b8239
[release/2.8] Define uint32 t when ROCM_VERSION >= 70000 (#2513)
rraminen Aug 19, 2025
2711b3e
[AUTOGENERATED] [release/2.8] [ROCm] OffsetCalc Unroll Optimization (…
dhonnappa-amd Sep 3, 2025
5b2a37c
Bug fix and optimisation for persistent reduction kernel tuning (#2596)
jataylo Sep 4, 2025
7b8bc05
[ROCm] Fix indexing_backward_kernel perf (#2667)
jerrymannil Sep 22, 2025
506d5ce
[ROCm] Improve perf for elementwise broadcast with mixed dtype (#2672)
jerrymannil Sep 23, 2025
55b2445
[ROCm] Implement float32 copy kernel (#2683)
jerrymannil Sep 25, 2025
123b638
Bump triton to 3.5.x
pragupta Oct 9, 2025
426b2e8
Update fbgemm submodule to avoid ck errors
pragupta Oct 9, 2025
31b3b8e
Merge remote-tracking branch 'upstream/release/2.9' into release/2.9_…
github-actions[bot] Oct 14, 2025
06ee6e4
Merge pull request #2709 from ROCm/release/2.9_IFU_2025-10-14
jithunnair-amd Oct 14, 2025
c126ff5
Update version to 2.9.0
jithunnair-amd Oct 15, 2025
4fe15f2
[ROCm] Fix non-stride-one backwards indexing performance
rocm-repo-management-api[bot] Oct 16, 2025
9bb5bae
[release/2.9] remove amdgpu-coerce-illegal-types=1 (#2720)
ethanwee1 Oct 17, 2025
fa57f9c
[ROCm] Adjust grid size for non-unit stride backwards indexing
rocm-repo-management-api[bot] Oct 17, 2025
2fbf444
[Inductor model breakage] Revert upstream commits in library loading …
jataylo Oct 17, 2025
1735e04
[Release 2.9] Inductor perf cherry picks (#2723)
jataylo Oct 17, 2025
2ef9fcd
Update to tip of release/internal/3.5.x (#2727)
jataylo Oct 17, 2025
72b4ee5
[Release/2.9] pin requirements (#2719)
ethanwee1 Oct 17, 2025
5ed482a
Optimized BiLiear 2D Up Sampling for AMD MI devices (#2729)
glen-amd Oct 17, 2025
7dc7c69
[release/2.9] Corrective PR (#2733)
ethanwee1 Oct 21, 2025
e09ce05
[ROCm/Windows] Support aotriton for scaled_dot_product_attention on W…
jammm Sep 15, 2025
3a62a4d
[ROCm] Remove HIPBLASLT_ALLOW_TF32 from codebase (#162998)
xinyazhang Sep 18, 2025
5f9c692
[ROCm] Fix environment variable AOTRITON_INSTALLED_PREFIX (#163373)
xinyazhang Sep 22, 2025
caf1b51
[ROCm] Transformer/SDPA unit test parity (#163745)
xinyazhang Sep 25, 2025
8b386d1
[ROCm] Custom OpenBLAS library name (#2752)
jayhawk-commits Oct 27, 2025
642c8c0
[ROCm] [Normalization] Update block size
rocm-repo-management-api[bot] Oct 28, 2025
38af0bd
[ROCm] Deserialize loads in planer sum portion of reduce() of norm
rocm-repo-management-api[bot] Oct 28, 2025
25a49ce
[ROCm] deserialize loads in planer sum portion of stats() of norm
rocm-repo-management-api[bot] Oct 28, 2025
55c9130
new autotuning configs for wri0 (#2767)
AmdSampsa Oct 30, 2025
2b5fc74
[release/2.7] Tensor input dumping for triton kernels (#2716)
iupaikov-amd Oct 17, 2025
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
178 changes: 178 additions & 0 deletions .automation_scripts/parse_xml_results.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
""" The Python PyTorch testing script.
##
# Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""

import xml.etree.ElementTree as ET
from pathlib import Path
from typing import Any, Dict, Tuple

# Backends list
BACKENDS_LIST = [
"dist-gloo",
"dist-nccl"
]

TARGET_WORKFLOW = "--rerun-disabled-tests"

def get_job_id(report: Path) -> int:
# [Job id in artifacts]
# Retrieve the job id from the report path. In our GHA workflows, we append
# the job id to the end of the report name, so `report` looks like:
# unzipped-test-reports-foo_5596745227/test/test-reports/foo/TEST-foo.xml
# and we want to get `5596745227` out of it.
try:
return int(report.parts[0].rpartition("_")[2])
except ValueError:
return -1

def is_rerun_disabled_tests(root: ET.ElementTree) -> bool:
"""
Check if the test report is coming from rerun_disabled_tests workflow
"""
skipped = root.find(".//*skipped")
# Need to check against None here, if not skipped doesn't work as expected
if skipped is None:
return False

message = skipped.attrib.get("message", "")
return TARGET_WORKFLOW in message or "num_red" in message

def parse_xml_report(
tag: str,
report: Path,
workflow_id: int,
workflow_run_attempt: int,
work_flow_name: str
) -> Dict[Tuple[str], Dict[str, Any]]:
"""Convert a test report xml file into a JSON-serializable list of test cases."""
print(f"Parsing {tag}s for test report: {report}")

job_id = get_job_id(report)
print(f"Found job id: {job_id}")

test_cases: Dict[Tuple[str], Dict[str, Any]] = {}

root = ET.parse(report)
# TODO: unlike unittest, pytest-flakefinder used by rerun disabled tests for test_ops
# includes skipped messages multiple times (50 times by default). This slows down
# this script too much (O(n)) because it tries to gather all the stats. This should
# be fixed later in the way we use pytest-flakefinder. A zipped test report from rerun
# disabled test is only few MB, but will balloon up to a much bigger XML file after
# extracting from a dozen to few hundred MB
if is_rerun_disabled_tests(root):
return test_cases

for test_case in root.iter(tag):
case = process_xml_element(test_case)
if tag == 'testcase':
case["workflow_id"] = workflow_id
case["workflow_run_attempt"] = workflow_run_attempt
case["job_id"] = job_id
case["work_flow_name"] = work_flow_name

# [invoking file]
# The name of the file that the test is located in is not necessarily
# the same as the name of the file that invoked the test.
# For example, `test_jit.py` calls into multiple other test files (e.g.
# jit/test_dce.py). For sharding/test selection purposes, we want to
# record the file that invoked the test.
#
# To do this, we leverage an implementation detail of how we write out
# tests (https://bit.ly/3ajEV1M), which is that reports are created
# under a folder with the same name as the invoking file.
case_name = report.parent.name
for ind in range(len(BACKENDS_LIST)):
if BACKENDS_LIST[ind] in report.parts:
case_name = case_name + "_" + BACKENDS_LIST[ind]
break
case["invoking_file"] = case_name
test_cases[ ( case["invoking_file"], case["classname"], case["name"], case["work_flow_name"] ) ] = case
elif tag == 'testsuite':
case["work_flow_name"] = work_flow_name
case["invoking_xml"] = report.name
case["running_time_xml"] = case["time"]
case_name = report.parent.name
for ind in range(len(BACKENDS_LIST)):
if BACKENDS_LIST[ind] in report.parts:
case_name = case_name + "_" + BACKENDS_LIST[ind]
break
case["invoking_file"] = case_name

test_cases[ ( case["invoking_file"], case["invoking_xml"], case["work_flow_name"] ) ] = case

return test_cases

def process_xml_element(element: ET.Element) -> Dict[str, Any]:
"""Convert a test suite element into a JSON-serializable dict."""
ret: Dict[str, Any] = {}

# Convert attributes directly into dict elements.
# e.g.
# <testcase name="test_foo" classname="test_bar"></testcase>
# becomes:
# {"name": "test_foo", "classname": "test_bar"}
ret.update(element.attrib)

# The XML format encodes all values as strings. Convert to ints/floats if
# possible to make aggregation possible in Rockset.
for k, v in ret.items():
try:
ret[k] = int(v)
except ValueError:
pass
try:
ret[k] = float(v)
except ValueError:
pass

# Convert inner and outer text into special dict elements.
# e.g.
# <testcase>my_inner_text</testcase> my_tail
# becomes:
# {"text": "my_inner_text", "tail": " my_tail"}
if element.text and element.text.strip():
ret["text"] = element.text
if element.tail and element.tail.strip():
ret["tail"] = element.tail

# Convert child elements recursively, placing them at a key:
# e.g.
# <testcase>
# <foo>hello</foo>
# <foo>world</foo>
# <bar>another</bar>
# </testcase>
# becomes
# {
# "foo": [{"text": "hello"}, {"text": "world"}],
# "bar": {"text": "another"}
# }
for child in element:
if child.tag not in ret:
ret[child.tag] = process_xml_element(child)
else:
# If there are multiple tags with the same name, they should be
# coalesced into a list.
if not isinstance(ret[child.tag], list):
ret[child.tag] = [ret[child.tag]]
ret[child.tag].append(process_xml_element(child))
return ret
Loading