[Test] Add support for Hecbench_spirv test - #46
Open
pranavprakash-amd wants to merge 3 commits into
Open
Conversation
Signed-off-by: Pranav Prakash <pranav.prakash@amd.com>
pranavprakash-amd
force-pushed
the
users/pranavprakash-amd/Hecbench_spirv
branch
from
July 23, 2026 05:04
ac2c896 to
cbca053
Compare
Contributor
|
Add a NOTICES.md |
mparamas-amd
requested changes
Jul 27, 2026
| "(?:Total time \\(s\\): )([0-9.+-e]+)" | ||
| ], | ||
| "heat2d": [ | ||
| "(?:PASS)" |
Contributor
There was a problem hiding this comment.
Update regex entry from ["(?:PASS)"] to [""] — an empty string — so the test validates it on exit code alone, aligned with Original.
| Sum of all parsed numeric captures (``0.0`` when nothing matched). | ||
| """ | ||
| total = 0.0 | ||
| for match in re.findall(regex, output): |
Contributor
There was a problem hiding this comment.
Could you check with Original assert ? flatten of group required?
Author
There was a problem hiding this comment.
Validated with the original logic. The same logic of regex is been used
Signed-off-by: Pranav Prakash <pranav.prakash@amd.com>
Signed-off-by: Pranav Prakash <pranav.prakash@amd.com>
Contributor
|
@pranavprakash-amd did you root cause on the 3 test failures ? |
Author
Yes @mparamas-amd there are JIRA's tracking the failures with respect to the above. Have track of them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
HeCBench is a large, widely-used collection of HIP/CUDA benchmarks that exercises a broad cross-section of the compiler and HIP runtime stack. The
legacy suite (tests/COMPILERS/hecbench/hecbench.py, the HecBench class) validated these benchmarks but predates the rocm-tests framework — it
cloned the repo into an ad-hoc scratch dir, iterated src/-hip folders imperatively, and decided SPIR-V mode by sniffing an executor's
compiler string for the substring "spirv", reporting into a separate "Hecbench_spirv" suite.
This PR ports HeCBench into the rocm-tests framework as a marker-compliant, parametrized e2e test. The goals:
(plain hipcc) and a -spirv (--offload-arch=amdgcnspirv) test — giving explicit, per-benchmark SPIR-V codegen signal.
Technical Details
Adds tests/e2e/compiler/hecbench/ with four files:
checkout; puts --rock-dir's bin/ on PATH and sets LD_LIBRARY_PATH (via ld_path) so the Makefile's hipcc and the built binary resolve TheRock libs;
runs make clean/make/make run through target_executor so compile and run land on the same node/filesystem.
checkout -- Makefile, so the shared session checkout is never left in a patched state regardless of run order.
(_extract_total sums all float-castable captures, robust to multi-group regexes). Benchmarks with an empty regex are validated on clean exit only
— a deliberate, documented deviation from the legacy behavior, which marked those "failed" purely due to a test-data gap.
test_hecbench_full_suite (entire catalog, overrides to ci.weekly + runtime.soak). Both parametrized over benchmark × mode.
remote-aware external_build.clone_repo helper, replacing the legacy one-off clone. URL/ref overridable via ROCM_TEST_HECBENCH_URL /
ROCM_TEST_HECBENCH_REF; assert_license_present acts as a provenance guard.
Markers hw.gpu, layer.runtime, ci.nightly, e2e.stack, os.linux are auto-injected by CATEGORY_PROFILES for tests/e2e/compiler/; explicit runtime.*
/ ci.weekly markers are declared per function. No framework code changed — this is purely additive under tests/.
Prereqs: --rock-dir/ROCK_DIR pointing at a ROCm/TheRock install with bin/hipcc, an AMD GPU, and network access to clone HeCBench.
Test Plan
pytest tests/e2e/compiler/hecbench/test_hecbench.py --collect-only -q --no-gpu
pytest tests/e2e/compiler/hecbench/test_hecbench.py::test_hecbench_smoke -v
--rock-dir /path/to/therock --gpu-arch gfx942
pytest tests/e2e/compiler/hecbench/test_hecbench.py::test_hecbench_full_suite -v
-m "ci.weekly" --rock-dir /path/to/therock --gpu-arch gfx942
Test Result
====================================================== ROCm Test Suite Summary ======================================================
Test Directory PASS FAIL SKIP ERROR Duration
───────────────────────────────────────────────────────────────────
tests/e2e/compiler/hecbench 7 3 0 0 147.8 s
───────────────────────────────────────────────────────────────────
TOTAL 10 tests │ 7 passed │ 3 failed │ 0 skipped │ 0 error │ 147.8 s
Submission Checklist