Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 3.2 KB

File metadata and controls

46 lines (32 loc) · 3.2 KB

AGENTS.md — TRCE (Thermodynamic Reservoir Computing Engine)

What this repo is

A pure-software daemon that uses CPU thermal dynamics as a physical reservoir computing engine for AI inference. No GPU. The "computation" is heat propagation across silicon; the "memory" is residual heat from prior inputs. This is not conventional ML — it's physics-based reservoir computing.

Implementation plan: see PLAN.md for full architecture, API design, and phased rollout.

Hardware topology (do not deviate)

  • 4 thermal zones (thermal_zone0thermal_zone3) — reservoir state vectors (4-dim hidden layer)
  • 5 cooling devices (cooling_device2cooling_device6) — dissipative actuators (5-dim fan matrix)
  • Thermal inertia of the silicon acts as the temporal recurrence mechanism (short-term memory)
  • Fan power controls forgetting rate: fans off = long memory window; fans full = reset history

Note: Zone and device numbering is NOT fixed — probe at runtime via sysfs type fields.

Architecture (4 phases, strict order)

  1. Hardware Isolation — pin CPU core affinity, lock governor to max performance, disable thermald
  2. Feature-to-Heat Projection — encode input features as microsecond CPU dead-loop pulses (PWM); encode temporal/forgetting coefficients as fan on/off combinations; nonlinear activation emerges from Fourier heat diffusion
  3. State Telemetry — async non-blocking I/O reads 4 thermal zones within ms window after pulse; extract position vector (absolute T) and kinetic vector (dT/dt)
  4. Linear Readout — single-layer matrix multiply + bias + threshold (sign function) for classification; no deep network needed (physics already linearized the problem)

Key constraints

  • Requires root / sudo — hardware governor, CPU affinity, fan control, thermald management
  • Debian-specific — thermal zone and cooling device paths are Debian/proc/sysfs paths (/sys/class/thermal/thermal_zone*, /sys/class/thermal/cooling_device*)
  • Single-process daemon — no concurrent inference; hardware state is shared and non-reentrant
  • Offline weight fitting — readout weights are fitted externally (linear regression) then hardcoded into the daemon

Development workflow

  • This is a daemon process, not a library — run/test as a standalone service
  • Data collection phase: script盲跑 (blind sweep) hundreds of heat/cool combinations, log temperature features to build dataset
  • Offline fitting: use simple linear regression (scikit-learn or numpy) to compute readout weights
  • No GPU needed for development; no ML framework dependencies for inference
  • Testing requires real thermal hardware

Gotchas

  • Fan control paths (cooling_device26) are not necessarily sequential on all hardware — verify actual sysfs entries
  • thermal_zone numbering may vary across hardware — hardcoding zone indices without probing will break on different machines
  • CPU governor changes require cpupower or direct sysfs writes; not all systems have cpupower installed
  • Disabling thermald is irreversible until reboot — handle gracefully in cleanup/shutdown hooks
  • Temperature reads must be non-blocking and timestamped — blocking I/O skews the dT/dt gradient calculation