Skip to content

integer-ops: Optimize tests to improve runtime - #2804

Open
rjodinchr wants to merge 1 commit into
KhronosGroup:mainfrom
rjodinchr:integer-ops
Open

rjodinchr wants to merge 1 commit into
KhronosGroup:mainfrom
rjodinchr:integer-ops

Conversation

@rjodinchr

Copy link
Copy Markdown
Collaborator

This patch rationalizes the integer operations conformance tests by focusing on test data quality rather than raw random iteration quantity. By prioritizing high-value edge cases and removing redundant test suites, the overall workload is confidently reduced without sacrificing test integrity.

Specific changes include:

  • Remove explicit quick_* test definitions and handle workload scaling dynamically using gWimpyMode.
  • Replace hardcoded static specialCaseList arrays with mathematically dense edge cases generated dynamically via GetIntSpecialValues.
  • Add offset_limit and wimpy parameters to GetIntSpecialValues to drastically prune the combinatorial tree of generated edge cases when fast/wimpy runs are requested.
  • Rewrite char and uchar initialization to use a deterministic sliding 16-bit window instead of random data, systematically guaranteeing complete coverage for 8-bit interactions.

@rjodinchr
rjodinchr force-pushed the integer-ops branch 2 times, most recently from e729257 to b9b50f1 Compare September 9, 2026 12:56

@shajder shajder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR changes testing scope in two independent ways, first the per-type shift sizes are now cut differently by domain size (long -1, int -2, short -3, char down to exhaustive). Second, the 0..255 base sweep in InitIntSpecialValues is dropped unconditionally, not just in wimpy mode, so even a full conformance run loses that coverage with no way to opt back in.

Comment thread test_common/harness/conversions.h Outdated
Comment thread test_common/harness/conversions.h
Comment thread test_conformance/integer_ops/verification_and_generation_functions.cpp Outdated
Comment thread test_conformance/integer_ops/verification_and_generation_functions.cpp Outdated
Comment thread test_conformance/integer_ops/verification_and_generation_functions.cpp Outdated
This patch rationalizes the integer operations conformance tests by
focusing on test data quality rather than raw random iteration quantity.
By prioritizing high-value edge cases and removing redundant test suites,
the overall workload is confidently reduced without sacrificing test
integrity.

Specific changes include:
* Remove explicit `quick_*` test definitions and handle workload scaling
  dynamically using `gWimpyMode`.
* Replace hardcoded static `specialCaseList` arrays with mathematically
  dense edge cases generated dynamically via `GetIntSpecialValues`.
* Add `offset_limit` and `wimpy` parameters to `GetIntSpecialValues` to
  drastically prune the combinatorial tree of generated edge cases when
  fast/wimpy runs are requested.
* Rewrite `char` and `uchar` initialization to use a deterministic
  sliding 16-bit window instead of random data, systematically
  guaranteeing complete coverage for 8-bit interactions.

[run-test: test_integer_ops -w]

@shajder shajder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants