CPU / GPU Capability Verification Suite
This repository builds a staged set of C++ executables that verify CPU execution paths from fast IA-32 style scalar smoke tests up through SIMD, SHA, memory, hyperthread-pair, per-core, all-core, and optional Direct3D 11 GPU passes.
App Order
1. `cpu01_ia32_smoke`
Fast pinned single-logical-core verification of 8-bit cartesian integer operations, full 16-bit scalar sweeps, address generation, loops, and jumps.
2. `cpu02_scalar_spectrum`
Longer pinned single-core scalar run with larger 32-bit deterministic sweeps.
3. `cpu03_memtest`
CPU memory test with walking bits, full byte-pattern coverage, address-pattern verification, copy/invert, and stride stress.
4. `cpu04_fpu_simd`
Scalar floating-point, MMX, and SSE verification.
5. `cpu05_avx_fma_sha`
AVX2 gather/vector checks, FMA verification, and SHA round-instruction verification when the CPU exposes those features.
6. `cpu06_full_single`
Deep single-core run across all CPU categories.
7. `cpu07_ht_pair`
Runs the full CPU suite concurrently on the first hyperthread sibling pair detected in the topology map.
8. `cpu08_each_core`
Loops across every logical processor, pinning the worker to one logical core at a time.
9. `cpu09_all_core`
Launches one worker per logical processor and runs the full suite concurrently.
10. `cpu10_extended_domain`
Extended wraparound-domain multiply-accumulate verification. Runs literal full-domain loops for 8-bit types, enables literal full 16-bit cartesian loops in `--deep` and `--very-deep`, adds eight deep full 32-bit sweeps or 256 very-deep full 32-bit sweeps against 256 runtime-generated 32-bit patterns each, and uses exact modulo identities plus edge-slice execution for 32-bit and 64-bit types.
11. `gpu01_compute_smoke`
Direct3D 11 compute verification for integer ALU, loop, branch, and address-generation style kernels.
12. `gpu02_memtest`
Direct3D 11 compute memory-pattern verification.
Coverage Strategy
- Full-spectrum coverage is literal for byte-wide domains and for the dedicated full 16-bit scalar and floating-point integer-input sweeps.
- Larger 32-bit and 64-bit domains use deterministic wraparound sweeps plus dense edge-value sets because exhaustive pairwise 32-bit cartesian coverage is not time-feasible. In `cpu10_extended_domain --deep`, eight full `2^32` outer sweeps are additionally run against 256 runtime-generated 32-bit pattern values each; `--very-deep` raises that to 256 sweeps.
- Memory tests cover the full byte pattern range `0x00` through `0xFF`, walking ones/zeros, address-derived patterns, and stride behavior.
- For the extended multiply-accumulate app, same-width modulo accumulators produce `0` for 8/16/32/64-bit types. A result of `1` would only occur in a 1-bit ring, not for normal integer widths.
Build
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config Release
If you do not want the Direct3D 11 apps:
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCPUTEST_ENABLE_GPU=OFF
Run
Examples:
.\build\Release\cpu01_ia32_smoke.exe
.\build\Release\cpu03_memtest.exe --memory-mb 512
.\build\Release\cpu06_full_single.exe --very-deep --memory-mb 1024
.\build\Release\cpu08_each_core.exe --quick
.\build\Release\cpu10_extended_domain.exe --very-deep
.\build\Release\gpu01_compute_smoke.exe
.\build\Release\gpu02_memtest.exe --memory-mb 256
Common CPU flags:
- `--quick`
- `--standard`
- `--deep`
- `--very-deep`
- `--memory-mb <N>`
- `--logical <N>`
- `--list-topology`
- `--no-priority`
Common GPU flags:
- `--elements <N>`
- `--memory-mb <N>`
- `--adapter <N>`
Notes
- Priority ownership uses `HIGH_PRIORITY_CLASS` and `THREAD_PRIORITY_HIGHEST`, not realtime priority.
- The suite is written for x86/x64 processors. Non-x86 builds compile, but x86-specific categories skip.
- GPU apps require Windows with Direct3D 11 compute support.