Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SIMD Showcase logo

SIMD Showcase

A live Mandelbrot renderer that runs the same workload on every x86 SIMD generation, from MMX (1997) to AVX10.2, and on nine GPU APIs from Direct3D 9 to CUDA, down to 4-bit floats on the tensor cores. You can switch modes on and off as it runs, scale the thread count, and watch each mode's badge animate in as it engages. It also has an audio-reactive visualizer, an Extensions Lab for the oddball instructions, and a Low-Precision Lab for the tensor cores.

Download

Prebuilt Windows x64 builds are on the Releases page:

  • Versioned releases are listed there, and each version's changes are in CHANGELOG.md.
  • Ideas for upcoming versions live in ROADMAP.md.
  • The latest pre-release is rebuilt on every push to main.

Build and run

.\build.cmd
.\build\simd_showcase.exe

You need the Visual Studio 2026 Build Tools (MSVC, plus the CMake and Ninja that ship with it). Dear ImGui is a git submodule in third_party/imgui, pinned to v1.92.9b, so clone with:

git clone --recurse-submodules https://github.com/3nz0fred/simd-showcase

Modes

Mode Width Notes
Scalar 1 x FP64 Baseline
MMX 4 x INT16 Hand-written MASM, Q3.12 fixed point (PMADDWD tricks); goes blocky when you zoom
3DNow! 2 x FP32 Hand-written MASM (PFMUL/PFADD/PFCMPGT). Runs on K6-2 to Phenom II; the self-test checks its logic through a 1:1 SSE translation
SSE 4 x FP32 Counters kept in float lanes (SSE1 has no integer SIMD)
SSE2 2 x FP64
SSE3 1 complex per XMM ADDSUBPD + HADDPD complex multiply, one [re, im] per register
SSE4.1 2 x FP64 BLENDVPD freezes escaped lanes, PTEST checks them
AVX 4 x FP64 No FMA, no 256-bit integer ops
FMA4 4 x FP64 AMD Bulldozer-family only, four-operand FMA
AVX2 + FMA3 4 x FP64
AVX-512/256 4 x FP64 AVX-512VL: opmasks on YMM, avoiding the old 512-bit downclock
AVX-512 8 x FP64 Opmask escape test, masked adds, VPMOVQW
AVX10.1 8 x FP64 Same instructions as AVX-512, enumerated through CPUID leaf 0x24
AVX10.2 8 x FP64 Uses the AVX10.2-only VCVTTPD2QQS saturating convert
D3D11 FP32 / FP64 per pixel Direct3D 11 compute shader
D3D9 PS3 / D3D10 PS4 per pixel Graphics-pipeline modes: no compute shaders in these APIs, so a pixel shader on a full-screen quad
OpenGL FP32 / FP64 per pixel GLSL 4.3 compute shader, driver-compiled
OpenCL FP32 / FP64 per pixel OpenCL C kernel built by the vendor's driver at runtime
Vulkan FP32 / FP64 per pixel Hand-assembled SPIR-V: no SDK, no shader compiler
HIP FP32 / FP64 per pixel AMD HIP + hipRTC when AMD's runtime is installed (untested on NVIDIA)
D3D12 FP32 / FP64 per pixel Direct3D 12: root constants, root UAV, fences, timestamp queries, readback heap
CUDA FP32 / FP64 per pixel Hand-written PTX loaded through nvcuda.dll and JIT-compiled by the driver, so no CUDA toolkit is needed
CUDA FP16 / BF16 2 px per instruction Packed half2 / bf16x2 maths on the CUDA cores
CUDA FP8 / FP6 / FP4 per pixel Emulated: FP32 maths rounded through the GPU's own E4M3 / E3M2 / E2M1 converters after every operation, so you can watch the image fall apart

Every GPU mode except D3D11 returns raw iteration counts, which the CPU thread pool then colours. Their timings are GPU kernel time only. Shaders compile on worker threads at start-up and are cached in %LOCALAPPDATA%\SimdShowcase\shadercache, so later launches are ready in about half a second. The FP64 shaders are compiled with FXC's optimiser off, because --selftest caught FXC miscompiling the double-precision loop.

Visualizer

Press V, or pick Visualizer at the top of the controls, for audio-reactive, compute-heavy scenes: Julia Dance, Mandelbulb, Nebulabrot, Fractal Flame, Liquid Tunnel and Rollercoaster. They react to whatever your PC is playing, captured live with WASAPI loopback and run through an FFT. Pick another output or a microphone from the audio dropdown, and use the reactivity sliders to weight bass, mids, treble or the beat.

The Quality slider runs up to 2.0 ("extreme"), which allows up to 36 samples per pixel and about a million orbit threads per frame. Press N for the next scene.

Extensions Lab

A table of micro-benchmarks for the "little" extensions. Each one does the job its instruction was designed for, runs a plain C++ version of the same job, and checks that both give the same answer. The extensions covered are:

  • Bit manipulation: POPCNT, LZCNT, BMI1, BMI2 (PDEP/PEXT), ADX + MULX, MOVBE.
  • AMD-only: SSE4a, XOP.
  • Checksums and crypto: SSE4.2 CRC-32C, PCLMULQDQ, AES-NI, SHA-256, VAES, VPCLMULQDQ, GFNI.
  • Number formats: F16C, AVX512-BF16, AVX512-FP16.
  • Random numbers: RDRAND, RDSEED.
  • Integer dot products: AVX-VNNI, AVX512-VNNI.
  • Other AVX-512: VPOPCNTDQ, BITALG, compress-store, conflict detection, IFMA52, VBMI.
  • AMX: INT8 and BF16 tile matrix multiplies (Sapphire Rapids and later).

The results bring out quirks of each chip. Zen 1/2 run PDEP/PEXT in microcode, about 50x slower than the portable C++ code, and Zen 4's compress-to-memory is notoriously slow. Press L to open the lab; --selftest runs every lab check too.

Each tier is compiled in its own translation unit with its own /arch flag (see CMakeLists.txt), and the app dispatches to it at runtime from CPUID and XGETBV.

What runs where:

  • Zen 2 / Zen 3 and most Intel desktop chips up to 14th gen: up to AVX2 (14th gen adds AVX-VNNI, but no AVX-512).
  • Zen 4 / Zen 5: AVX-512 (Zen 5 at full 512-bit width).
  • AVX10: needs Granite Rapids (AVX10.1), or Diamond Rapids / Nova Lake (AVX10.2).

Low-Precision Lab

Press Q for tensor-core matrix multiplies in every format the GPU supports: TF32, FP16, BF16, FP8 (E4M3 / E5M2), FP6 (E3M2 / E2M3), FP4 (E2M1) and the block-scaled MXFP4 / NVFP4. Each result is checked against a CPU reference, each format's bit layout is drawn, and a precision ladder shows how deep each CUDA fractal precision can zoom before it goes blocky. FP6 and FP4 need a Blackwell GPU; the PTX is hand-written and JIT-compiled by the driver.

Controls

Key Action
1-9, 0 Pick a mode
A Auto mode: best enabled mode
Space Toggle auto zoom
T Tile heatmap: which thread rendered which tile
B Benchmark panel
L Extensions Lab
Q Low-Precision Lab
V Visualizer on / off
N Next visualizer scene
P / Pause Pause everything
S Settings

The mouse wheel zooms and dragging pans. Hover over any control for an explanation.

Settings and updates

The gear beside the version (or S) opens Settings: VSync, a frame-rate cap, process priority, the shader cache, a background self-test, and About with credits and a "Copy system info" button for bug reports.

The app can update itself from this repository's releases. It checks at start-up (you can turn that off), shows an Update available chip, then downloads the release zip, verifies its SHA-256, swaps the files in and restarts. The old files are kept as .old until the next launch. Choose Stable for tagged releases or Nightly for the latest build of main.

Stable releases from 0.9.0 on are also signed: each carries a <zip>.sig file (ECDSA P-256 over the zip's SHA-256) that the app checks against a public key built into it. A bad or missing signature refuses the install; older releases fall back to the digest alone, and the Nightly channel (built by CI) is unsigned by design and says so in Settings.

The checkboxes are the on/off switches for each accelerator. Auto mode falls back to the best mode that is still enabled. ILP interleave runs 1, 2 or 4 independent vector chains per loop, which shows the difference between being latency-bound and throughput-bound. Affinity compares letting the OS schedule threads against pinning one thread per core first, or packing SMT siblings together.

Releasing

  1. Tag and push (git tag vX.Y.Z; git push origin vX.Y.Z), then wait for the release workflow to publish the zip.
  2. On your own machine run .\scripts\Sign-Release.ps1 -Tag vX.Y.Z. It downloads the zip, checks it against GitHub's digest, signs it with your private key and uploads <zip>.sig. -VerifyOnly re-checks a published release.

One-time setup (done for this repository; key id 7a2a44041b25ded2):

  • .\scripts\New-ReleaseKey.ps1 creates the keypair. The private key is saved outside the repo (default %USERPROFILE%\.simd-showcase\release-signing.key), DPAPI-encrypted for your Windows user, and never printed or sent to CI. Paste the generated public-key snippet into src/release_key.h.
  • Make an offline backup: .\scripts\Backup-ReleaseKey.ps1 asks for a passphrase and writes release-signing.key.backup, encrypted with AES-256-GCM (PBKDF2-SHA256, 600,000 rounds). Keep it offline, with the passphrase stored separately. The DPAPI file alone won't decrypt after a Windows reinstall or on another PC.
  • Restore after a reinstall or on a new PC: .\scripts\Restore-ReleaseKey.ps1 -Backup <file>. Add -CheckOnly to just test a backup.
  • If the key is lost for good, existing installs can't verify releases signed with a new key, and users must update once by hand.
  • Key rotation: add the new key to kReleaseKeys while keeping the old one.

Cross-machine comparison

  1. Run the Benchmark on each machine (a fixed 1280x720 scene, so results are comparable).
  2. Click Export CSV. The results land in build\results\<cpu>.csv.
  3. Copy all the CSVs into one results folder.
  4. Click Compare machines to see them side by side.

Testing modes your CPU lacks

simd_showcase.exe --selftest checks every supported kernel against the scalar reference and writes selftest.txt next to the exe. To exercise AVX-512 or AVX10 on hardware that lacks them, run the self-test under Intel's Software Development Emulator:

sde64 -<cpu> -- .\build\simd_showcase.exe --selftest

Replace -<cpu> with the flag for a CPU that has the feature (see sde64 -help). The emulator's timings are meaningless, but correctness is checked.

Command-line switches

Switch What it does
--selftest Check every CPU and GPU kernel against reference images, write selftest.txt and exit (--backend=NAME tests one GPU API)
--tensorlab Run the Low-Precision Lab headless, write tensorlab.txt and exit
--audiotest Check audio capture and exit
--updatetest Check both update channels and exit (developer: --download, --install, --pretend-version=X.Y.Z; --sigfile=F.sig --zipfile=F.zip only verifies a local signature)
--tier=NAME Start in a mode, e.g. AVX2, MMX, D3D11, CUDA
--vis=N Start in visualizer scene N
--bench, --lab, --lowp, --gallery, --settings Open (and run) that panel; --settingstab=0..3 picks a Settings tab
--tiles, --nowall, --gpudie, --nosmt Tile heatmap on, feature wall off, GPU die view, SMT off
--nocache Compile shaders without the disk cache
--capture=out.png --at=SECONDS Save a screenshot after N seconds and exit (no update check; add --checkupdates to allow one)
--modeflip Stress test: flip modes, scenes and sizes quickly and log any bad frame to modeflip.txt

The badges are original procedural artwork in era-inspired styles. No vendor logos are reproduced.

Licence

SIMD Showcase is released under the MIT licence. It bundles Dear ImGui (MIT, Copyright (c) 2014-2026 Omar Cornut).

CPU, GPU and API names (Intel, AMD, NVIDIA, Microsoft, Khronos and their products) are trademarks of their owners and are used only to describe what the app runs on. The licence doesn't cover them.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages