Repository navigation
Conversation
…tures Bring in the configure-time fixtures, checker script, pre-commit hook and workflow from PR 372, adapted to main's validator. Main has no VNNI level and no mandatory-level rule, so that fixture is dropped and the VNNI lines are replaced with legal levels. The multi-arch probe tests stay for a later PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ahuber21
marked this pull request as ready for review
November 26, 2026 13:48
ahuber21
requested review from
ethanglaser,
homksei,
mihaic,
rfsaliev and
yuejiaointel
as code owners
November 26, 2026 13:48
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The override job lacks assertions that would catch the runtime dimension table disagreeing with the reduced surface, rejecting 32/384 while accepting removed extents such as 160.
What changed in this PR
Adds dispatch-surface validation tests following #395, bringing fixture-based checks from #372 into the CMake test setup.
Changes:
- Adds valid declarations and invalid fixtures with expected diagnostics.
- Adds a shell runner and pre-commit hook for declaration validation.
- Adds CI checks for default configuration and reduced-surface builds and tests.
| File | Description |
|---|---|
| tests/cmake/dispatch-surface/valid-reduced.cmake | Defines a surface with non-default dimensions. |
| tests/cmake/dispatch-surface/valid-minimal.cmake | Defines a single-fixed-dimension surface. |
| tests/cmake/dispatch-surface/invalid-zero-extent.cmake | Checks rejection of zero dimensions. |
| tests/cmake/dispatch-surface/invalid-unknown-level.cmake | Checks rejection of unknown ISA levels. |
| tests/cmake/dispatch-surface/invalid-non-numeric-extent.cmake | Checks rejection of nonnumeric dimensions. |
| tests/cmake/dispatch-surface/invalid-no-levels.cmake | Checks rejection of an empty ISA list. |
| tests/cmake/dispatch-surface/invalid-no-extents.cmake | Checks rejection of an empty dimension list. |
| tests/cmake/dispatch-surface/invalid-missing-extents.cmake | Checks rejection of an unset dimension list. |
| tests/cmake/dispatch-surface/invalid-level-without-tu.cmake | Checks rejection of missing kernel translation units. |
| tests/cmake/dispatch-surface/invalid-level-none.cmake | Checks rejection of the NONE sentinel. |
| tests/cmake/dispatch-surface/invalid-level-missing-field.cmake | Checks rejection of incomplete ISA entries. |
| tests/cmake/dispatch-surface/invalid-level-empty-field.cmake | Checks rejection of empty architecture fields. |
| tests/cmake/dispatch-surface/invalid-dynamic-listed.cmake | Checks rejection of explicitly listed Dynamic dimensions. |
| tests/cmake/dispatch-surface/invalid-duplicate-level.cmake | Checks rejection of duplicate ISA levels. |
| tests/cmake/dispatch-surface/invalid-duplicate-infix.cmake | Checks rejection of duplicate translation-unit infixes. |
| tests/cmake/dispatch-surface/invalid-duplicate-extent.cmake | Checks rejection of duplicate dimensions. |
| tests/cmake/dispatch-surface/invalid-duplicate-arch.cmake | Checks rejection of shared architecture targets. |
| .pre-commit-config.yaml | Runs validation on relevant file changes. |
| .github/workflows/dispatch-surface.yml | Adds declaration and reduced-surface CI jobs. |
| .github/scripts/check_dispatch_surface.sh | Checks fixture outcomes and expected diagnostics. |
Review effort: Balanced
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DSVS_BUILD_TESTS=YES \ | ||
| -DSVS_BUILD_BINARIES=NO \ | ||
| -DSVS_DISPATCH_SURFACE_FILE="${GITHUB_WORKSPACE}/tests/cmake/dispatch-surface/valid-reduced.cmake" |
This branch has not been deployed
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.

Follow-up to #395. Adds configure-time tests for the dispatch surface declaration, split out of #372.
It adds a bunch of cmake files that define
valid-andinvalid-tests. valid = no failure expected, should compile. invalid = cmake configure failure expected. A shell script pulls the files in one by one and reports if all produced the expected result. A CI job was added that executes this script.