Skip to main content

Module simulation

Module simulation 

Source
Expand description

Simulation Testing Framework (TRUENO-SPEC-012)

Provides deterministic, reproducible, and falsifiable validation of compute operations across all backends: SIMD (CPU), PTX (CUDA), and WGPU.

This module integrates with the sovereign stack (simular) and follows Toyota Production System principles:

  • Jidoka: Built-in quality - stop on defect
  • Poka-Yoke: Mistake-proofing via type safety
  • Heijunka: Leveled testing across backends
  • Genchi Genbutsu: Visual inspection of results
  • Kaizen: Continuous performance improvement

§Example

use trueno::simulation::{SimTestConfig, BackendTolerance};

let config = SimTestConfig::builder()
    .seed(42)
    .tolerance(BackendTolerance::default())
    .build();

Structs§

BackendSelector
Poka-Yoke: Type-safe backend selection
BackendTolerance
Backend-specific tolerance configuration
BufferRenderer
Simple buffer renderer for SIMD output visualization
ColorPalette
Color palette for heatmap rendering
GoldenBaseline
Golden baseline manager for visual regression testing
HeijunkaScheduler
Heijunka: Balanced test distribution across backends and sizes
JidokaGuard
Jidoka guard for simulation tests
NeedsSeed
Builder state: seed not set
PixelDiffResult
Pixel diff result for visual regression testing
Ready
Builder state: ready to build
Rgb
RGB color for visualization
SimTestConfig
Simulation test configuration
SimTestConfigBuilder
Simulation test configuration builder
SimulationTest
Simulation test configuration
StressAnomaly
Anomaly detected during stress testing
StressResult
Stress test result for a single operation
StressTestConfig
Stress test configuration for trueno operations
StressThresholds
Performance thresholds for stress testing
VisualRegressionConfig
Visual regression test configuration (Genchi Genbutsu)

Enums§

BackendCategory
Backend category for selection result
JidokaAction
Jidoka action on condition trigger
JidokaCondition
Jidoka condition that triggers stop
JidokaError
Jidoka error types
StressAnomalyKind
Types of stress test anomalies