Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
2ea93b3
test(rocfft): stable, position-aware hash for bitwise repro buffers (…
Abuudiii Oct 12, 2026
01f6f9c
Revert "fix(hipblaslt): correct MI300A kernel selection in the WGMXCC…
TriveniTadapaneni Oct 12, 2026
70b6646
perf(gfx1201): enable Origami catalogs for TN F8F8S/B8B8S/I8II (#13396)
vuksan314 Oct 12, 2026
e813540
perf(navi31): gfx1100 Origami Prediction libraries for HHS/BBS NN (#…
vuksan314 Oct 12, 2026
e2aef14
perf(rocsparse): avoid per-row L2 write-back/invalidate on gfx942/gfx…
ntrost57 Oct 12, 2026
b8cf0e7
docs(hipthreads): explain callable stack space and how to design arou…
marsavicc Oct 12, 2026
4d0a7e5
feat(rocsparse): add the rocsparse_spsort public API (#12553)
jsandham Oct 12, 2026
39758c3
feat(rocsparse): implement rocsparse_spsort for COO matrices (#12555)
jsandham Oct 12, 2026
6b1351a
feat(rocsparse): implement rocsparse_spsort for CSR matrices (#12556)
jsandham Oct 12, 2026
f23c580
feat(rocsparse): implement rocsparse_spsort for CSC matrices (#12557)
jsandham Oct 12, 2026
697cca2
test(rocsparse): add rocsparse_spsort tests and benchmarks for COO (#…
jsandham Oct 12, 2026
bf9d8f3
test(rocsparse): add rocsparse_spsort tests and benchmarks for CSR (#…
jsandham Oct 12, 2026
a20c781
test(rocsparse): add rocsparse_spsort tests and benchmarks for CSC (#…
jsandham Oct 12, 2026
dc39bad
fix(rocfft): fix plan creation failures for fused Bluestein with padd…
regan-amd Oct 12, 2026
79c5f26
fix(rocfft): fix GPU faults of fused Bluestein with unit batch distan…
regan-amd Oct 12, 2026
49dc11e
Update TheRock reference to (015ba17) (#13408)
assistant-librarian[bot] Oct 12, 2026
24bdd07
fix(hipblaslt): remove wrong gfx950 f16 solutions (#13269)
tony-davis Oct 12, 2026
781ecfa
feat(rocsparse): add the BUILD_WITH_SPSORT feature flag (#13392)
jsandham Oct 12, 2026
e0672e0
ci(hostnumerics): add Clang sanitizer and tidy checks (#13447)
newling Oct 12, 2026
97dac5f
feat(hostnumerics): map native C++ scalar types (#13427)
newling Oct 12, 2026
e265f68
test(rocsparse): run unit tests in standard, comprehensive, and full …
kliegeois Oct 12, 2026
214ad34
fix(hipblaslt): sync the matmul test stream before destroying it (#13…
yenong-amd Oct 12, 2026
7e24af8
Add scheduled TDM FMHA for FP16 and BF16 (#13063)
Jeff-Huang Oct 13, 2026
46d0941
fix(rocke): normalize gfx11 processors to generic catalog (#13531)
shumway Oct 13, 2026
429ba1f
fix(tensilelite): gfx1250 codegen fixes for e2e yamls (#13488)
geotseng-amd Oct 13, 2026
7daa4cc
feat(rocblas): default to hipBLASLt for GEMM with fp16/bf16/fp64 on g…
shbae Oct 13, 2026
775e9fe
gfx1250 post loop optimization (#13235)
jichangjichang Oct 13, 2026
bbd8c79
fix(rocke): fix dgrad aot regressions (#13494)
bartekxk Oct 13, 2026
6b8e1f6
feat(rocke): stream-K for implicit-GEMM conv wgrad (#13151)
jakpiase Oct 13, 2026
15bf7ef
perf(rocke/conv): select merged groups automatically for depthwise …
jakpiase Oct 13, 2026
93ff285
test(rocke): parallelize validation (#13352)
shumway Oct 13, 2026
80400e1
fix(rocke): derive GPU reference archive path (#13506)
shumway Oct 13, 2026
1e094cb
AISPARSE-678: clamp csrgeam multipass grids and add grid-stride loops…
kliegeois Oct 13, 2026
30ae22e
feat(rocBLAS): Switched rocBLAS default backend to hipBLASLt for Comp…
kamuruga08 Oct 13, 2026
a2ad482
feat(rocblas): enable gfx1170 and gfx1171 (#13378)
stsokolo Oct 13, 2026
1418f42
fix(rocke): unblock torch-free KDA benchmark tests (#13502)
shumway Oct 13, 2026
183759b
perf(rocsparse): bitmap path for csrgemm rows whose hash table does n…
ntrost57 Oct 13, 2026
19e336f
fix(hipfft): build JIT callback tests on every backend (#13443)
regan-amd Oct 13, 2026
8f19ea1
fix(rocprim): Fix a heap-buffer-overflow error detected by ASAN (#12884)
amd-hsong Oct 13, 2026
86c686b
feat(hipblaslt,origami): Add gfx1170 and gfx1171 target support (#12369)
stsokolo Oct 13, 2026
8bd5cfa
update rocprim version
stanleytsang-amd Oct 8, 2026
db21d05
fix(hipccl): legacy header links are broken on Windows
stanleytsang-amd Oct 8, 2026
470bba4
fix(hipccl3): remove the unused Google Benchmark dependency from rocT…
stanleytsang-amd Oct 8, 2026
593a9de
fix(hipccl): install benchmarks to <bindir>/<project>
stanleytsang-amd Oct 8, 2026
ee5d491
fix(hipccl): give rocPRIM and hipCUB benchmarks unique executable names
stanleytsang-amd Oct 8, 2026
f7b0e93
fix(hipccl): address review of legacy header copy and benchmark naming
stanleytsang-amd Oct 9, 2026
9f79212
fix(rocke): close conv perf gaps after the switch to AOT (#13320)
jakpiase Oct 13, 2026
c1207c1
fix(rocprim): resolve histogram device through get_device_from_stream…
bobbyphilip-amd Oct 13, 2026
ac8ceb2
feat(geko): Add gfx1250 support (#13052)
amd-ysanchez Oct 13, 2026
c6f41a6
feat(rocke): merged groups for depthwise conv forward implicit GEMM (…
jakpiase Oct 13, 2026
64d1d8a
fix(tensilelite): sync waves before a persistent tile's first DirectT…
tony-davis Oct 13, 2026
0025266
test(integration-tests): re-tier integration bundles per op and make …
adickin-amd Oct 13, 2026
92418e3
fix(miopen): gate backward-pass GEMM for small-batch 1x1 NHWC conv on…
amd-ahyttine Oct 13, 2026
0896df5
AISPARSE-703: clamp bsr2csr / csr2bsr / csr2bsr_nnz block-row grids a…
kliegeois Oct 13, 2026
d34a219
AISPARSE-689/691: clamp gtsv right-hand side and batch counts on grid…
kliegeois Oct 13, 2026
389dd9f
AISPARSE-667: bellmm support for large dense column counts (clamp gri…
kliegeois Oct 13, 2026
07d858e
(feat) add partial-pass c2r new lengths (#13510)
eng-flavio-teixeira Oct 13, 2026
6e797f1
fix(rocfft): keep host code in SPIR-V-only client builds (#13445)
regan-amd Oct 13, 2026
829afd0
AISPARSE-696/697/668: shared grid helpers, batch grid.y clamp, and cs…
kliegeois Oct 13, 2026
d044951
build(deps): bump pyjwt from 2.13.0 to 2.15.0 in /projects/hipdnn/doc…
dependabot[bot] Oct 13, 2026
f6ccd04
fix(hipblaslt): lay out E with lde and stride_e in the CPU reference …
tony-davis Oct 13, 2026
8799419
hipCUB: free index buffer in arg-reduction tests (#13046)
sa-faizal Oct 13, 2026
61ee8f0
Update hipCCL packaging versions and add changelogs
stanleytsang-amd Oct 13, 2026
be616f9
Add changelogs
stanleytsang-amd Oct 13, 2026
a7c5317
feat(rocke): data prefetch, workgroup clusters, multicast loads, and …
yraparti Oct 13, 2026
0ef231c
feat(miopen): forward convolution entry points to hipDNN behind MIOPE…
NolanHannaAMD Oct 13, 2026
3dc098e
fix(rpp): Destroy HIP stream in HIP test drivers (#13319)
sruthi0107 Oct 13, 2026
562a252
[rocThrust] Add callable_proxy return type and remaining guards (port…
stanleytsang-amd Oct 13, 2026
8ff7fcb
fix(rocBLAS) : batched graph allow hipblaslt (#13246)
TorreZuk Oct 13, 2026
7104798
doc(hipfft): add CHANGELOG entry (#13566)
regan-amd Oct 13, 2026
115e23c
feat(hipblaslt): replay a managed tuning cache (HIPBLASLT_TUNING_MODE…
jinchen62 Oct 13, 2026
fbe2cd0
[rpp] Use SIMDE for portable SIMD intrinsics on non-x86 architectures…
benrichard-amd Oct 13, 2026
c2612de
AISPARSE-698: stop the CSR validator from silently skipping rows (#12…
kliegeois Oct 13, 2026
522c242
feat(hipdnn): honor deselect NONDETERMINISTIC in cuDNN shim and centr…
mousdahl-amd Oct 13, 2026
6d6562e
fix(rocBLAS) : need filter to avoid env interp (#13548)
TorreZuk Oct 13, 2026
85f9f22
docs(rocfft): align legacy callback docs with fields restriction (#13…
regan-amd Oct 13, 2026
f21b8d2
docs(rpp) update conf.py for breathe 5 (#13197)
spolifroni-amd Oct 13, 2026
b5c1c01
feat(ck): wrw merged groups coverage & LDS layout fix (gfx1250) (#13318)
EnricoDeg Oct 13, 2026
ad0baf4
test(rocke): speed up rocKE differential gate (#13511)
shumway Oct 13, 2026
c166525
feat(hipblaslt): Add Inf Support for TF32 Emulation (On by default fo…
smalekta Oct 13, 2026
9cffe57
fix(miopen): drop invalid CK perf configs from the gfx1200 system dat…
yassinsolim Oct 13, 2026
58179e4
fix(miopen): restore the gfx1201 large-tensor CK entries that the cur…
yassinsolim Oct 13, 2026
d5f4680
[hipSOLVER] Add getrsBatched for testing (#5164)
john00003 Oct 13, 2026
ebcb34e
feat(rocke/attention): gfx942 dense prefill sinks support (#12620)
dlangbe Oct 13, 2026
39ed988
AISPARSE-692/693/694: gtsv offsets, zero-batch guard and BSR row-map …
kliegeois Oct 13, 2026
fad26ec
feat(ci): Update TheRock reference to (`c01e3a3` - 10-12-2026) and ad…
geomin12 Oct 13, 2026
55c7ae9
fix(rocke): use the HIP runtime and comgr TheRock torch loaded (#12930)
yassinsolim Oct 14, 2026
6dca09f
feat(rocke): add FP64 support for elementwise and reduce (#13141)
minseobshin11 Oct 14, 2026
b8021b3
feat(miopen): re-add gfx1250 to the MIOpen dev image (#12986)
JonathanLichtnerAMD Oct 14, 2026
f7570e3
ci(gfx1250): self-build gfx1250-strict per PR (#12983)
archana-ramalingam Oct 14, 2026
cb41a2c
doc(rocBLAS, hipBLAS) : updates for changes and doc (#13584)
TorreZuk Oct 14, 2026
3f89bac
feat(rocsparse) add BUILD_WITH_TRSM_REFACTORING option (ON by default…
YvanMokwinski Oct 14, 2026
380be3b
feat(rocsparse): aux add dense matrix/vector copy and transpose primi…
YvanMokwinski Oct 14, 2026
ef1ca9b
feat(rocsparse): add refactored, batch-capable SpTRSM/SpSM implementa…
YvanMokwinski Oct 14, 2026
b614a64
feat(rocsparse): add SpTRSM and dense matrix client tests (#11352)
YvanMokwinski Oct 14, 2026
c3325b4
hipfft: fix unsigned wraparound in get_random_dist causing assertion …
trixirt Oct 14, 2026
091eb4d
fix(tensilelite): share one Debug instance across the tensilelite-hos…
davidd-amd Oct 14, 2026
52ddd47
ci(hipdnn): add packaging probes to the superbuild CI (ALMIOPEN-2833)…
BrianHarrisonAMD Oct 14, 2026
5a66296
[hipDNN] Stage fetched flatbuffers for the example engine plugin (ALM…
CMiservaAMD Oct 14, 2026
3e8db7c
docs(miopen): backfill missing ROCm 10.2.0 changelog entries (#13565)
JonathanLichtnerAMD Oct 14, 2026
9a867b1
[hipSOLVER] Add getriBatched for testing (#5163)
john00003 Oct 14, 2026
dc027c8
feat(hipblaslt): enable gfx1250 MXFP4 with E5M3 block-16 scale (#13234)
mengzcai Oct 14, 2026
3ee3eaa
fix(rocke): fence the reg_prefetch prologue LDS read in the interleav…
afagaj Oct 14, 2026
fad01fd
fix(tensilelite): cap HalfPLR LocalReadVectorWidth to avoid codegen c…
StaceyLai Sep 29, 2026
1fd750c
fix(tensilelite): move HalfPLR setup before the wider-local-read check
boringmorning Sep 30, 2026
f1180f9
fix(tensilelite): derive HalfPLRA/B before the DepthU retry loop
boringmorning Sep 30, 2026
30a5009
test(tensilelite): cover HalfPLR local-read width cap and guard rejects
StaceyLai Oct 6, 2026
bee0d64
feat(rocwmma): add initial gfx117X support (#13317)
mstankov-amd Oct 14, 2026
1798638
feat(rocrand): enable gfx1170 and gfx1171 (#13324)
stsokolo Oct 14, 2026
88c22a8
feat(rocroller): add gfx1170 and gfx1171 architecture targets (#13322)
stsokolo Oct 14, 2026
2e5ef67
feat(miopen): Add gfx1170 and gfx1171 target support (#13321)
stsokolo Oct 14, 2026
3ddb928
feat(hiptensor): hide internal symbols with a visibility baseline (#1…
evedovelli Oct 14, 2026
5145510
fix(hipblaslt): scale the right rows in the CPU reference with a padd…
tony-davis Oct 14, 2026
9814c93
docs(hipcub, rocthrust, rocprim) added migration docs and aligned for…
spolifroni-amd Oct 14, 2026
d510d80
fix(rocrand): stop Sobol teardown aborting after hipDeviceReset (#12821)
bobbyphilip-amd Oct 14, 2026
8aea8b3
fix(rocsparse): fixes batched calculation for sptrsm and diagonal sol…
YvanMokwinski Oct 14, 2026
dde230d
docs(rocprim, rocthrust) fixed a format issue in rocprim landing page…
spolifroni-amd Oct 14, 2026
02caab6
test(hipblaslt): add a CPU-only test client, plus its first host-only…
tony-davis Oct 14, 2026
09ecff5
[rocWMMA]: Update changelog and bump version for ROCm 10.2 (#13592)
bsyrowik Oct 14, 2026
198636d
feat(hip-kernel-provider): expand gfx1151 inference SDPA coverage (#1…
dpeabody-amd Oct 14, 2026
e581a92
fix(rocprim): Fix tuners not using new dict param (#13550)
NguyenNhuDi Oct 14, 2026
e25a153
fix(hipcub): Fix Block Histogram and Block Run Length Recode Benchmar…
NguyenNhuDi Oct 14, 2026
49bb1f7
fix(hipblaslt): correct MI300A kernel selection in the WGMXCC predica…
NaveenElumalaiAMD Oct 14, 2026
9501ac8
feat(ck): wavelet direct load pipeline for convolution fwd (#12706)
EnricoDeg Oct 14, 2026
1bdda47
[hipSOLVER] Add geqrfBatched for testing (#5161)
john00003 Oct 14, 2026
375fa1a
Merge branch 'develop' into users/Parthiv911/rocke/gfx942-dense-cfvst…
AviralGoelAMD Oct 14, 2026
25e6e76
docs(rocke): use device identifier for gfx942 case-study hardware
AviralGoelAMD Oct 14, 2026
460b627
docs(rocke): scope and bound the gfx942 CFVST/KDB/VPF case study
AviralGoelAMD Oct 14, 2026
e3ccb2e
docs(rocke): record gfx942 bf16 CFVST/KDB/VPF register usage
AviralGoelAMD Oct 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/actions/ci-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Single source of truth for shared CI constants (TheRock ref, Docke
outputs:
therock-ref:
description: "TheRock commit hash to use"
value: "05add1921fd03b0649f054ec2a7c54d162c0cd99" # 2026-10-08
value: "c01e3a3f3f67966dd35612cf363b49964f33cd47" # 2026-10-12
kpack-ref:
description: "rocm-systems commit whose shared/kpack provides the rocm_kpack packing tooling"
# Copied into dnn-providers/hip-kernel-provider/cmake/KpackPython.cmake and
Expand All @@ -13,7 +13,7 @@ outputs:
value: "a022846cf553c2b135410a5168f97705f1b9c6ac" # 2026-08-22
baseline-run-id:
description: "TheRock workflow run ID for prebuilt stage artifacts"
value: "37655107204" # Updated by assistant-librarian[bot] on submodule bumps
value: "38220501023" # Updated by assistant-librarian[bot] on submodule bumps
docker-image:
description: "Docker container image for Linux builds"
value: "ghcr.io/rocm/therock_build_manylinux_x86_64@sha256:cf4f6d9909056906e4a1c0bc4c245658a0af4c6a6174082a86adfa2d518b7aeb"
Expand Down
166 changes: 166 additions & 0 deletions .github/scripts/check_probe_junit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
#!/usr/bin/env python3
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT

"""Prove that every declared hipDNN packaging probe ran and passed.

The superbuild lanes run the whole ctest suite once with --output-junit. ctest
exits 0 when a test is disabled or not run, so this script reads that junit file
and checks it against the manifest the CMake configure wrote (one ctest test
name per line). Testcases not named in the manifest are ignored.

The manifest always names the probe tooling test "hkp-probe-tools", plus one entry
per declared probe. A lane whose GPU_TARGETS cover every architecture the
descriptors name declares no probe, so "hkp-probe-tools" alone is a valid manifest;
an empty one means the configure did not write it properly.

The manifest is written by the same configure that discovers the probes, so on its
own it cannot tell "this lane builds every architecture" from "discovery found
nothing". A lane that must always declare probes passes --min-probes N: the check
fails when the manifest names fewer than N tests besides "hkp-probe-tools". The
default is 0, which accepts a manifest with no probe.

For every manifest name, the junit must hold exactly one testcase with that
name, and that testcase must have run (status "run" or "fail"; without a status
attribute, no <skipped> child) and must have no <failure> or <error> child.

Usage:
check_probe_junit.py --junit build/ctest-junit.xml \
--manifest build/hkp-probes/manifest.txt [--min-probes N]

Exit codes:
0 every manifest name ran exactly once and passed
1 one or more checks failed; each prints
"check_probe_junit: FAIL <id>: <detail>", where <id> is one of
manifest-unreadable, manifest-too-small, probes-too-few, junit-unreadable,
name-missing, name-duplicate, not-run, failure, error
"""

import argparse
import sys
import xml.etree.ElementTree as ET
from pathlib import Path

# The "hkp-probe-tools" test; probes are optional unless --min-probes asks for them.
MIN_MANIFEST_ENTRIES = 1
TOOLS_TEST = "hkp-probe-tools"


def read_manifest(path: Path) -> list[str]:
return [line.strip() for line in path.read_text().splitlines() if line.strip()]


def ran(case: ET.Element) -> bool:
"""Return whether ctest ran the testcase.

ctest writes status "run", "fail", "disabled" or "notrun"; only the first
two mean the test executed.
"""
status = case.get("status")
if status is None:
return case.find("skipped") is None
return status in ("run", "fail")


def check(
junit_path: Path, manifest_path: Path, min_probes: int = 0
) -> list[tuple[str, str]]:
"""Return (id, detail) for every failed check; empty means green."""
try:
names = read_manifest(manifest_path)
except OSError as exc:
return [("manifest-unreadable", f"{manifest_path}: {exc}")]

failures: list[tuple[str, str]] = []
if len(names) < MIN_MANIFEST_ENTRIES:
failures.append(
(
"manifest-too-small",
f"{manifest_path} lists {len(names)} test(s), expected at least "
f"{MIN_MANIFEST_ENTRIES} (hkp-probe-tools)",
)
)

probes = [name for name in names if name != TOOLS_TEST]
if len(probes) < min_probes:
failures.append(
(
"probes-too-few",
f"{manifest_path} declares {len(probes)} probe(s), expected at "
f"least {min_probes}; if this lane now builds every architecture "
f"the descriptors name, drop --min-probes for it, otherwise probe "
f"discovery found nothing",
)
)

try:
root = ET.parse(junit_path).getroot()
except (OSError, ET.ParseError) as exc:
failures.append(("junit-unreadable", f"{junit_path}: {exc}"))
return failures

cases: dict[str, list[ET.Element]] = {name: [] for name in names}
for case in root.iter("testcase"):
found = cases.get(case.get("name", ""))
if found is not None:
found.append(case)

for name, found in cases.items():
if not found:
failures.append(
("name-missing", f"declared test '{name}' is not in the junit")
)
continue
if len(found) > 1:
failures.append(
(
"name-duplicate",
f"declared test '{name}' appears {len(found)} times in the junit",
)
)
for case in found:
if not ran(case):
status = case.get("status")
failures.append(
("not-run", f"test '{name}' did not run (status={status})")
)
if case.get("status") == "fail" or case.find("failure") is not None:
failures.append(("failure", f"test '{name}' failed"))
if case.find("error") is not None:
failures.append(("error", f"test '{name}' errored"))

return failures


def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
parser.add_argument(
"--junit", required=True, type=Path, help="ctest --output-junit file"
)
parser.add_argument(
"--manifest",
required=True,
type=Path,
help="file listing one declared ctest test name per line",
)
parser.add_argument(
"--min-probes",
type=int,
default=0,
help="fail when the manifest names fewer probes than this, not counting "
f"{TOOLS_TEST} (default 0: no probe is acceptable)",
)
args = parser.parse_args(argv)

failures = check(args.junit, args.manifest, args.min_probes)
for check_id, detail in failures:
print(f"check_probe_junit: FAIL {check_id}: {detail}")
if failures:
return 1
count = len(read_manifest(args.manifest))
print(f"check_probe_junit: OK {count} declared test(s) ran and passed")
return 0


if __name__ == "__main__":
sys.exit(main())
160 changes: 160 additions & 0 deletions .github/scripts/tests/test_check_probe_junit.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT

import os
import sys
import tempfile
import unittest
from pathlib import Path

sys.path.insert(0, os.fspath(Path(__file__).parent.parent))
import check_probe_junit as cpj

MANIFEST = ["hkp-probe-gfx950", "hkp-probe-tools"]


def case_xml(name: str, child: str = "", status: str | None = None) -> str:
body = f"<{child}/>" if child else ""
if status is None:
status = {"skipped": "notrun", "failure": "fail"}.get(child, "run")
status_attr = f' status="{status}"' if status else ""
return (
f'<testcase name="{name}" classname="{name}" time="1"{status_attr}>'
f"{body}</testcase>"
)


def junit_xml(cases: list[str]) -> str:
return (
'<?xml version="1.0" encoding="UTF-8"?>'
f'<testsuite name="(empty)" tests="{len(cases)}">{"".join(cases)}</testsuite>'
)


class CheckProbeJunitTest(unittest.TestCase):
def setUp(self):
tmp = tempfile.TemporaryDirectory()
self.addCleanup(tmp.cleanup)
self.dir = Path(tmp.name)

def run_check(
self, xml: str, manifest: list[str], min_probes: int = 0
) -> list[str]:
junit_path = self.dir / "ctest-junit.xml"
manifest_path = self.dir / "manifest.txt"
junit_path.write_text(xml)
manifest_path.write_text("".join(f"{n}\n" for n in manifest))
return [
check_id for check_id, _ in cpj.check(junit_path, manifest_path, min_probes)
]

def test_all_declared_tests_passed(self):
xml = junit_xml([case_xml(n) for n in MANIFEST])
self.assertEqual(self.run_check(xml, MANIFEST), [])

def test_skipped_test_fails(self):
xml = junit_xml([case_xml(MANIFEST[0]), case_xml(MANIFEST[1], "skipped")])
self.assertEqual(self.run_check(xml, MANIFEST), ["not-run"])

def test_disabled_test_without_skipped_child_fails(self):
xml = junit_xml(
[case_xml(MANIFEST[0], status="disabled"), case_xml(MANIFEST[1])]
)
self.assertEqual(self.run_check(xml, MANIFEST), ["not-run"])

def test_unknown_status_fails(self):
xml = junit_xml([case_xml(MANIFEST[0], status="bogus"), case_xml(MANIFEST[1])])
self.assertEqual(self.run_check(xml, MANIFEST), ["not-run"])

def test_skipped_child_without_status_fails(self):
xml = junit_xml(
[case_xml(MANIFEST[0], "skipped", status=""), case_xml(MANIFEST[1])]
)
self.assertEqual(self.run_check(xml, MANIFEST), ["not-run"])

def test_missing_status_without_skipped_child_passes(self):
xml = junit_xml([case_xml(n, status="") for n in MANIFEST])
self.assertEqual(self.run_check(xml, MANIFEST), [])

def test_unrelated_testcases_are_ignored(self):
xml = junit_xml(
[
case_xml("hipdnn-unit-tests"),
case_xml(MANIFEST[0]),
case_xml("other-disabled", status="disabled"),
case_xml("other-failed", "failure"),
case_xml(MANIFEST[1]),
]
)
self.assertEqual(self.run_check(xml, MANIFEST), [])

def test_duplicate_declared_name_fails(self):
xml = junit_xml([case_xml(n) for n in MANIFEST] + [case_xml(MANIFEST[0])])
self.assertEqual(self.run_check(xml, MANIFEST), ["name-duplicate"])

def test_declared_name_missing_fails(self):
xml = junit_xml([case_xml(MANIFEST[0]), case_xml("hipdnn-unit-tests")])
self.assertEqual(self.run_check(xml, MANIFEST), ["name-missing"])

def test_empty_manifest_fails(self):
xml = junit_xml([case_xml(n) for n in MANIFEST])
self.assertIn("manifest-too-small", self.run_check(xml, []))

def test_manifest_without_probe_passes(self):
xml = junit_xml([case_xml("hkp-probe-tools")])
self.assertEqual(self.run_check(xml, ["hkp-probe-tools"]), [])

def test_failure_fails(self):
xml = junit_xml([case_xml(MANIFEST[0], "failure"), case_xml(MANIFEST[1])])
self.assertEqual(self.run_check(xml, MANIFEST), ["failure"])

def test_fail_status_without_failure_child_fails(self):
xml = junit_xml([case_xml(MANIFEST[0], status="fail"), case_xml(MANIFEST[1])])
self.assertEqual(self.run_check(xml, MANIFEST), ["failure"])

def test_error_fails(self):
xml = junit_xml([case_xml(MANIFEST[0]), case_xml(MANIFEST[1], "error")])
self.assertEqual(self.run_check(xml, MANIFEST), ["error"])

def test_unparseable_junit_fails(self):
self.assertEqual(self.run_check("<testsuite", MANIFEST), ["junit-unreadable"])

def test_min_probes_fails_on_tools_only_manifest(self):
xml = junit_xml([case_xml("hkp-probe-tools")])
self.assertEqual(
self.run_check(xml, ["hkp-probe-tools"], min_probes=1),
["probes-too-few"],
)

def test_min_probes_met_passes(self):
xml = junit_xml([case_xml(n) for n in MANIFEST])
self.assertEqual(self.run_check(xml, MANIFEST, min_probes=1), [])

def test_missing_manifest_fails(self):
junit_path = self.dir / "ctest-junit.xml"
junit_path.write_text(junit_xml([case_xml(n) for n in MANIFEST]))
failures = cpj.check(junit_path, self.dir / "absent.txt")
self.assertEqual([c for c, _ in failures], ["manifest-unreadable"])

def test_main_exit_codes(self):
junit_path = self.dir / "ctest-junit.xml"
manifest_path = self.dir / "manifest.txt"
manifest_path.write_text("".join(f"{n}\n" for n in MANIFEST))
argv = [
"--junit",
os.fspath(junit_path),
"--manifest",
os.fspath(manifest_path),
]
junit_path.write_text(junit_xml([case_xml(n) for n in MANIFEST]))
self.assertEqual(cpj.main(argv), 0)
junit_path.write_text(junit_xml([case_xml(MANIFEST[0])]))
self.assertEqual(cpj.main(argv), 1)
junit_path.write_text(junit_xml([case_xml("hkp-probe-tools")]))
manifest_path.write_text("hkp-probe-tools\n")
self.assertEqual(cpj.main(argv), 0)
self.assertEqual(cpj.main([*argv, "--min-probes", "1"]), 1)


if __name__ == "__main__":
unittest.main()
Loading