Skip to content

Build CTS tests in Release with assertions enabled - #53

Merged
Groverkss merged 3 commits into
developfrom
users/Groverkss/cts-hip-o2
Oct 6, 2026
Merged

Groverkss merged 3 commits into
developfrom
users/Groverkss/cts-hip-o2

Conversation

@Groverkss

@Groverkss Groverkss commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The CTS pytest adapter leaves the CMake build type unset, so most HIP tests compile without optimization. In ROCm/rocm-systems#12790, the ASan/UBSan simulator corpus step took 37m32s, dominated by FPSAN software emulation of small matrix operations.

Configure CTS with CMAKE_BUILD_TYPE=Release and keep test assertions enabled with add_compile_options(-UNDEBUG). This uses the toolchain's standard optimized configuration without overwriting CMAKE_HIP_FLAGS. Existing per-target optimization settings remain effective. Keep the two wave32 mbcnt targets and the gfx1250 comparison target unoptimized so their required instructions survive compilation; require v_mbcnt_hi_u32_b32 alongside v_mbcnt_lo_u32_b32 in the gfx1250 coverage manifest. Test inputs, semantic variants, and rocjitsu sanitizer settings are unchanged.

Validation:

  • Four selected corpus cases passed: FPSAN core, math, gfx1100 WMMA acc16, and tied bf16. The two WMMA executables ran all 14 GoogleTest checks without skips.
  • All 38 integer ISA coverage tests passed.
  • Full gfx1250 linked-image integer coverage passed. The strengthened manifest rejects the pre-fix mbcnt binary.
  • Disassembly confirms one v_mbcnt_hi_u32_b32 in each wave32 binary, versus none before the fix. RDNA4 wave32 and wave64 runtime tests passed.
  • Local gfx1250 runtime checks timed out with SDK 10.1.0a20260831; the original unoptimized comparison test also timed out in this environment.
  • Generated C++ and HIP compile commands enable Release optimization and undefine NDEBUG afterward to preserve assertions.

Local execution times:

gfx1100 test Initial Release
fpsan_wmma_gfx11_acc16_test 20.94s 0.26s
fpsan_wmma_gfx11_tied_bf16_test 23.56s 0.24s

Initial values are single unoptimized runs; Release values are medians of five runs with assertions enabled. Measurements use the same simulator (b7fe18cf7e28a72eb0d811c66f5509fdc0365228), ROCm SDK 10.1.0a20260831, sources, and machine; timings exclude compilation.

We also reproduced the optimization benefit in a CI experiment, which passed all four lanes. Compared with the original run, complete simulator corpus step durations, including compilation, fell from 37m32s to 8m12s for ASan/UBSan, 20m10s to 10m01s for GCC UBSan, and 9m25s to 7m21s for the Release simulator lane.

@Groverkss Groverkss changed the title Optimize CTS HIP test builds with -O2 Build CTS tests in Release with assertions enabled Oct 5, 2026
@Groverkss
Groverkss marked this pull request as ready for review October 5, 2026 18:13
@Groverkss
Groverkss requested a review from a team as a code owner October 5, 2026 18:13

@kuhar kuhar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing I noticed

Comment thread tests/test_suites/cts.py Resolved
@Groverkss
Groverkss merged commit 387502e into develop Oct 6, 2026
kuhar pushed a commit to ROCm/rocm-systems that referenced this pull request Oct 7, 2026
## Motivation

Rocjitsu CI still pins a corpus revision that builds most CTS tests
without optimization. Pick up ROCm/rocjitsu-test-corpus#53 so CI uses
Release builds with assertions enabled while preserving required integer
instruction coverage.

## Technical Details

Bump the HIP/DBT corpus pin from
`cc781dd88cabd1638d1beeb4539c521ccf27de60` to
`387502e864cce3f0490a967e9a185b4922a5e7de` in both the automatic
checkout fallback and the manual-dispatch default. Update the pin's date
comment.

The pinned revision includes the wave32 `mbcnt` and gfx1250 comparison
optimization overrides and the strengthened `mbcnt_hi` coverage
requirement. The bump also includes intervening corpus changes,
including the newer gfx1250 ISA coverage and runtime CTS additions; see
the [corpus commit
range](ROCm/rocjitsu-test-corpus@cc781dd...387502e).

Temporarily exclude all 37 gfx1250 CTS cases introduced by
ROCm/rocjitsu-test-corpus#41 (22 integer cases) and
ROCm/rocjitsu-test-corpus#42 (15 memory cases), including their coverage
checks. The existing skip configuration applies to both the initial run
and failed-test retries.

Reason: These tests are really slow and haven't been verified for their
usefulness. Someone needs to investigate these before they are enabled

## Issue Tracking

ISSUE ID: ROCm/rocjitsu-test-corpus#53

## Test Plan

- Parse the workflow YAML and verify the dispatch default and automatic
checkout pin both select the merged corpus revision.
- Run the repository pre-commit checks on the changed workflow and `git
diff --check`.
- Exercise the updated pin through this PR's rocjitsu corpus workflow.

## Test Result

Local YAML/pin validation, applicable pre-commit checks, and whitespace
checks passed. A targeted pytest run confirms all 37 integer/memory
cases are skipped before build or execution (37 skipped, 43 deselected).

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
anujshuk-amd pushed a commit to ROCm/rocm-systems that referenced this pull request Oct 12, 2026
## Motivation

Rocjitsu CI still pins a corpus revision that builds most CTS tests
without optimization. Pick up ROCm/rocjitsu-test-corpus#53 so CI uses
Release builds with assertions enabled while preserving required integer
instruction coverage.

## Technical Details

Bump the HIP/DBT corpus pin from
`cc781dd88cabd1638d1beeb4539c521ccf27de60` to
`387502e864cce3f0490a967e9a185b4922a5e7de` in both the automatic
checkout fallback and the manual-dispatch default. Update the pin's date
comment.

The pinned revision includes the wave32 `mbcnt` and gfx1250 comparison
optimization overrides and the strengthened `mbcnt_hi` coverage
requirement. The bump also includes intervening corpus changes,
including the newer gfx1250 ISA coverage and runtime CTS additions; see
the [corpus commit
range](ROCm/rocjitsu-test-corpus@cc781dd...387502e).

Temporarily exclude all 37 gfx1250 CTS cases introduced by
ROCm/rocjitsu-test-corpus#41 (22 integer cases) and
ROCm/rocjitsu-test-corpus#42 (15 memory cases), including their coverage
checks. The existing skip configuration applies to both the initial run
and failed-test retries.

Reason: These tests are really slow and haven't been verified for their
usefulness. Someone needs to investigate these before they are enabled

## Issue Tracking

ISSUE ID: ROCm/rocjitsu-test-corpus#53

## Test Plan

- Parse the workflow YAML and verify the dispatch default and automatic
checkout pin both select the merged corpus revision.
- Run the repository pre-commit checks on the changed workflow and `git
diff --check`.
- Exercise the updated pin through this PR's rocjitsu corpus workflow.

## Test Result

Local YAML/pin validation, applicable pre-commit checks, and whitespace
checks passed. A targeted pytest run confirms all 37 integer/memory
cases are skipped before build or execution (37 skipped, 43 deselected).

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/rocm-systems/blob/develop/CONTRIBUTING.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants