Skip to main content

Module benchmark

Module benchmark 

Source
Expand description

Stability benchmark for GPU hardware metrics.

Runs a minimum 180-second benchmark collecting:

  • GPU utilization (sampled every 10s, float in [0.0, 100.0])
  • VRAM usage (used and total in MB)
  • Thermal behavior (temperature in °C, range 0–120)
  • Throttling indicators (boolean)
  • Clock speeds (positive MHz)

§Minimum Duration (VAL-TELE-001)

The benchmark must run for at least 180 seconds. Shorter runs are flagged as incomplete and excluded from submission.

§Sampling (VAL-TELE-002)

GPU utilization is sampled at least every 10 seconds. For a 180-second run, this produces ≥18 samples.

§Hardware Metrics (VAL-TELE-003, VAL-TELE-004)

VRAM metrics enforce vram_used_mb ≤ vram_total_mb. Thermal values are clamped to [0, 120]. Clock speeds are positive. Throttling is a boolean.

Structs§

BenchmarkOutcome
Result of a benchmark run, including whether it meets minimum requirements.
GpuSample
A single GPU metric sample collected during a benchmark run.

Constants§

MAX_PAYLOAD_SIZE_BYTES
Maximum payload size in bytes (64 KiB).
MAX_TEMP_C
Maximum thermal value in Celsius.
MIN_BENCHMARK_DURATION_SECS
Minimum benchmark duration in seconds.
MIN_SAMPLE_COUNT
Minimum number of samples required for a valid 180s benchmark. At 10s intervals over 180s, we expect ≥18 samples (one at t=0 + 17 more).
SAMPLE_INTERVAL_SECS
Sampling interval in seconds.

Functions§

run_benchmark
Run the stability benchmark for the specified duration.
sample_gpu_metrics
Sample GPU metrics once using rocm-smi.
validate_benchmark
Validate that a benchmark outcome meets all quality criteria.