CREST

Measure the Deployment, Not Just the Model: Rethinking Hardware-Aware Model Selection for Microcontrollers

Joseph Q. Zales, Pragya Sharma, Mani Srivastava
University of California, Los Angeles

CREST is an open-source tool for comparing models on microcontrollers. Run a search, measure candidates on the board, and replay them under the timing constraints of your application.

Which model saves energy between predictions?

A sensor that reports every 100 milliseconds spends part of each period waiting.

Suppose two models both finish before the next sensor reading arrives. The faster one can finish inference using less energy, yet leave the board waiting longer. Which model uses less energy over the whole period?

On the STM32 N657, two architectures switched places in the energy ranking when the interval between predictions changed from 100 to 500 milliseconds at the same clock speed.

CREST lets you run that comparison on your own workload by replaying candidates on the target board under each schedule.

See the schedule experiment

Continuous inference repeats without an intentional waiting interval. Periodic inference releases one prediction per period and includes the following sleep or wait in the measured window.
Continuous execution measures energy per inference. Periodic execution measures the complete release interval, including inference and waiting.

Abstract

Selecting an energy-efficient model for periodic sensing requires accounting for time between inferences. Hardware-aware model search typically measures inference alone, even when the application cares about energy per release. We present CREST (Cross-platform Runtime Evaluation and Search Tool), an open-source hardware-in-the-loop experimentation system that evaluates model and hardware configurations under a specified release schedule. Researchers can vary the objective, schedule, target and candidate proposer while reusing evaluation and replay. Records preserve comparison conditions and separate valid measurements from deployable candidates. Three case studies demonstrate the system. First, searches and controlled replay on STM32 N657 show how waiting changes model and clock selection. For one architecture, continuous inference favors 800 MHz over 300 MHz at 8.0 versus 17.1 mJ per inference, but additional waiting offsets 97% of this saving in a fitted decomposition. With STOP between releases, 300 MHz uses about 0.3-0.4% less board energy per release at 100 and 500 ms. At a fixed clock, the preferred architecture changes between release periods, which a model with shared waiting parameters cannot produce. Latency predicts continuous energy within a median 1.7% on held-out observations, yet most release-energy error remains in scheduled terms. In paired replay, one of six randomly selected near-latency pairs reverses its continuous-energy order by 5.8 mJ per release. Second, replay on three Arduino targets shows proxy-selected inertial-odometry candidates can fail to fit or use more energy than measured selections, with only 9 of 16 FLOPs-selected candidates fitting the most memory-constrained board. Third, an audio classification study reuses the evaluator with LLM-based candidate proposers, and cross-target replay moves a selected configuration from third to last in energy rank.

What CREST Does

Vary deployment choices while reusing evaluation, measurement records and replay.

Configure a study
Select proxy or measured objectives, float32 or int8 quantization, and scalar or Pareto policies. Backend-supported options such as CPU clock can be part of the candidate configuration.
Measure the intended schedule
Continuous execution reports energy per inference. Periodic execution reports energy per release, including inference and the following sleep or waiting interval.
Check deployment constraints
Target backends compile, program and evaluate candidates. Measurement validity is recorded separately from memory, latency and deadline feasibility.
Replay selected configurations
Reevaluate candidates on another target or schedule without repeating the search or training. Records keep source quality separate from destination hardware measurements.
Change the candidate proposer
Optuna-native samplers and LLM proposal policies use the same evaluator. Proposed configurations receive the same deployment checks, scoring and measurement records.
Extend the system
Dataset, task, model-family and target-backend interfaces allow researchers to add workloads and deployment paths while retaining the surrounding evaluation and logging code.

System Overview

Candidate proposal, workload evaluation and target measurement use replaceable interfaces.

A study configuration selects the workload, model family, target backend, schedule, quantization, scoring policy and candidate proposer. TPE, NSGA-II or an LLM proposer supplies candidates to Optuna-managed trials. Workload modules prepare data and build models. Target backends compile, program and measure candidates. Choose float32 or int8 models, then rank candidates by a scalar score or compare competing objectives on a Pareto front. See the configuration guide for shipped examples.

CREST study configuration selects a candidate proposer, dataset, task, model family and target backend. Shared orchestration connects Optuna trials, logging and HIL measurements to an objective policy.
Replaceable proposers, workload modules and target backends share evaluation, logging and policy feedback.

Each measurement record identifies the interval, validity, deployment feasibility and provenance of its values. A valid energy measurement can remain available even when a candidate misses its deadline. Replay evaluates selected configurations without repeating the search or training, keeping source quality separate from destination hardware measurements.

HIL Measurement Setup

A separate harness MCU reads an INA228 monitor while observing DUT GPIO markers. The markers delimit the measurement window, and accumulated energy is normalized per invocation or release. Coordinated measurements are accepted only when DUT timing, harness completion and run counts agree.

Measurements cover inference and waiting at the development-board USB supply. They include components powered through that input and exclude sensor acquisition, feature extraction and communication. Substantial power remains during sleep, so energy rankings depend on the deployment’s power boundary.

CREST HIL power-measurement setup with a DUT powered through an INA228 monitor and a separate BLE33 harness observing GPIO markers.
The DUT is powered through an INA228 monitor. A separate harness reads power telemetry over I2C and observes GPIO markers.

Case Studies

Two sensing workloads across three Arm Cortex-M development boards.

Case study 1

Inference savings do not always transfer to periodic execution

Six searches on STM32 N657 compare continuous-energy and periodic-energy selection at 100, 200 and 500 ms. Controlled replay shows that waiting can change the preferred clock and architecture.

For one architecture, continuous execution favors 800 MHz over 300 MHz at 8.01 versus 17.06 mJ per inference. Additional waiting offsets 97% of this saving in a fitted decomposition. With STOP between releases, 300 MHz uses about 0.3–0.4% less energy per release. At 300 MHz, two architectures also reverse their energy ordering between 100 and 500 ms.

What CREST enables

Latency predicts continuous energy well, but most release-energy error remains in scheduled terms. Calibrated estimates can guide selection, while scheduled replay checks differences they miss.

Release-energy differences at 100 and 500 ms show that the preferred architecture at 300 MHz changes with the period. Both lines are relative to trial 203 at 800 MHz.
Negative values favor 300 MHz over trial 203 at 800 MHz. Points show means and paired 95% intervals. Lines connect measured endpoints.

Case study 2

Target measurements change proxy-selected tradeoffs

This study uses the OxIOD inertial odometry example to compare FLOPs, memory-traffic and measured-energy objectives using the same TCN architecture and float or int8 search space. Proxy-selected candidates are replayed on Nano 33 BLE Sense and the Portenta H7 M4 and M7 cores.

Only nine of 16 FLOPs-selected candidates deploy on BLE33. Among valid replay-front points, the median nearest-RMSE energy gap across the three targets is 14.8% for FLOPs and 38.4% for memory traffic. Some proxy-replay points also dominate measured-search points, so target measurements establish which tradeoffs are available.

What CREST enables

Take candidates selected under different objectives through common deployment checks and measurements, preserving their source validation quality.

9 / 16FLOPs-selected candidates successfully deploy on BLE33.
13 / 26FLOPs replay-front points are dominated by measured-energy candidates.
Proxy replay and measured-energy fronts on three Arduino configurations, followed by a separate STM32 search over models and CPU clocks.
The first three panels compare proxy replay with measured-energy search. The STM32 panel is a separate architecture-and-clock search. Lower energy and RMSE are better. Filled markers meet the 200 ms latency threshold.

Case study 3

Reuse the evaluator across workloads and candidate proposers

The UrbanSound8K audio classification example uses prepared log-mel features and a DS-CNN family. TPE and two LLM proposal policies use the same application score and deployment checks. Each of six searches reaches 200 feasible trials.

On Portenta, History selects validation macro-F1 of 0.761 at 61.7 mJ per inference, compared with TPE’s 0.760 at 152.5 mJ. Replaying all six selections changes their energy ordering. The Portenta TPE selection ranks third by energy on Portenta and last on STM32. These results demonstrate evaluator reuse and target-dependent choices, rather than general proposer superiority.

What CREST enables

Change the workload and proposer while retaining the evaluator, then replay the selected configurations to check whether their energy ordering transfers to another target.

Audio quality and energy for TPE, Memory and History on Portenta and STM32. Stars mark each strategy's score-selected configuration.
Each strategy contributes 200 feasible trials, including repeated configurations. Stars mark the highest application score. The 400 mJ line is a scoring scale, not a feasibility cutoff.
@misc{zales2026crest,
  author = {Joseph Q. Zales and Pragya Sharma and Mani Srivastava},
  title = {Measure the Deployment, Not Just the Model: Rethinking Hardware-Aware Model Selection for Microcontrollers},
  year = {2026},
  eprint = {2606.15004},
  archivePrefix = {arXiv},
  primaryClass = {eess.SY},
  doi = {10.48550/arXiv.2606.15004}
}