Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk5 min

Two Locks on a Green Build: Prompt Hashes and RSS Limits for AI C++ Evals

Use a versioned evaluation manifest to identify what an AI eval tested, and CTest resource allocation to schedule declared capacity. Neither prompt hashes nor CTest slots guarantee deterministic output or impose a universal RSS ceiling.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A reliable AI evaluation build needs two separate controls: an identity for the inputs you evaluated, and a scheduler that keeps parallel tests within declared resource capacity. A prompt hash can help identify an evaluation, but it does not make model output deterministic. CTest can schedule declared resource slots, but those slots are not a universal limit on process peak memory (RSS).

Why an AI evaluation build needs two separate controls

A passing CI result is useful only if you can tell what was evaluated and whether the runner had enough capacity to run the tests as intended. Those are related operational concerns, but they require different controls.

As an Amazon Associate I earn from qualifying purchases.

Control What it identifies or limits What it does not guarantee
Evaluation manifest and hash The exact, documented set of evaluation inputs represented by the manifest. Identical model output, or a complete record if relevant inputs were omitted.
CTest resource allocation Declared test resource slots, when a resource specification and test requirements are supplied. A universal per-process or aggregate RSS ceiling.
Memory checker Runs tests through a configured memory-checking tool. By itself, a portable peak-RSS enforcement policy.

Keeping these controls separate prevents two common mistakes: treating a prompt hash as a reproducibility guarantee and treating test scheduling as memory enforcement.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What should an evaluation hash identify?

Hash a defined evaluation identity, not just a prompt string

Evaluation systems contain more than prompt text. OpenAI’s Evals documentation describes evaluation criteria, data-source configuration, templated messages, graders, and runs; its documentation also gives prompt-version as an example metadata value. For an AI/C++ evaluation, record the inputs that can change the result, including:

  • The prompt or message template, with a clear policy on whether the identity covers the source template or fully rendered messages.
  • Variable values and any system or developer instructions that affect the tested input.
  • Tool schemas or other context supplied to the model, when applicable.
  • The evaluation dataset and its version.
  • The grader, rubric, or scoring configuration and its version.
  • The model snapshot and relevant parameters.
  • The evaluation harness revision and build configuration.

These are project-level provenance recommendations based on the fields exposed by evaluation systems; OpenAI does not prescribe a canonical prompt-hashing protocol.

Define canonicalization before computing the hash

A hash is meaningful only if you can explain exactly which bytes it covers. Serialize a versioned manifest using a documented, stable representation—for example, with stable field ordering and explicit encodings—and hash those exact bytes. Include a manifest-schema or canonicalization version so a future representation change cannot silently be confused with an older one. Keep the readable manifest beside the hash so a reviewer can inspect what it represents.

Choose and document whether the hash represents a source template or the fully rendered messages, including variable values. If the evaluation also depends on data, graders, model settings, tool definitions, or harness code, preserve those identities separately in the manifest even if the project chooses not to include every field in one hash. The reviewed vendor documentation does not establish a standard set of fields or a canonicalization algorithm.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Keep prompt identity separate from model identity

A matching prompt hash does not mean that two runs used the same model or will produce the same answer. Store the model snapshot and parameters as distinct run metadata, along with dataset, grader, and harness versions. OpenAI notes that prompting behavior can vary between model snapshots, recommends pinned model versions where available, and recommends application evaluations for consistency. When a model version or evaluation input changes, rerun the application evaluation rather than assuming the old result still applies.

How CTest schedules declared resources

Describe capacity and test demand

CTest’s resource allocation feature is a cooperative scheduler. A resource specification file describes capacity on the runner, while each test’s RESOURCE_GROUPS property declares the slots it needs. When the feature is used, the CMake CTest documentation says CTest will not oversubscribe the configured resources.

The resource specification must reflect the machine or runner where the tests execute. CTest does not discover or manage GPU capacity for the project: the project or a generated resource specification must provide the capacity information. Tests should use the allocated-resource environment information to decide which resources to consume.

Activate allocation in the test invocation

Declaring a test’s resource requirements is not enough on its own. Supply the resource specification when invoking CTest, and ensure the test harness can tell whether allocation information is available. If the invocation omits the resource file, the harness must not assume that CTest has reserved resources for the test.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CTest reports a test that requests more slots than are available as not run. That is a scheduling outcome, not proof that the test passed or that its resource request was satisfied. Inspect the test result and invocation configuration in CI rather than treating every completed CTest run as evidence that allocation was active.

Fit declarations to actual test use

  • Define the resource types and available slots for the runner in its resource specification.
  • Declare each test’s resource-group needs with RESOURCE_GROUPS.
  • Pass the matching resource specification to the CTest test step.
  • Have tests consume the allocation information CTest provides instead of independently assuming a device or slot is free.
  • Keep the specification, build configuration, test output, and evaluation manifest with the CI run record.

CTest also supports configure, build, and test steps in dashboard workflows, which can make those results part of a reported workflow. That reporting support does not define how a particular project retains CI artifacts; retention is a project or CI-platform decision.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Does CTest enforce an RSS limit?

No. CTest resource slots describe declared, schedulable resources; they are not documented as a universal per-process peak-RSS limit or an aggregate memory ceiling for a job or container. A test could request an abstract resource slot while still using more memory than expected, and the slot declaration alone does not measure or stop that use.

CTest’s memory-check step is a separate feature that runs tests through a memory checker. It should not be described as a built-in, cross-platform peak-RSS limiter. The official CTest material does not provide a universal recipe for sampling and enforcing RSS across platforms.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose an enforcement mechanism for the actual memory target

If CI must enforce a hard memory limit, select and verify a mechanism provided by the target runner, operating system, or container environment. First decide whether the limit applies to one process or the aggregate job/container. Then verify what the mechanism measures and how container accounting affects the reported reading. Document the runner-specific behavior: the available evidence does not establish one portable enforcement method.

A practical CI workflow

  1. Define the evaluation manifest. Record prompt/template identity and rendering policy, dataset, grader or rubric, model snapshot and parameters, and harness revision. Version the manifest schema.
  2. Canonicalize and hash it. Specify the representation and exact bytes being hashed, retain the readable manifest, and store the hash with run metadata.
  3. Pin model versions where available. Rerun the application evaluation when the model version or evaluation inputs change; a stored hash identifies inputs, not output determinism.
  4. Declare test resource demand. Create a resource specification that matches the runner and add each test’s RESOURCE_GROUPS requirements.
  5. Enable allocation at test time. Confirm the CTest invocation passes the resource specification and that tests use allocation information only when it is active.
  6. Enforce memory separately if required. Configure and verify the runner’s actual process or aggregate-memory mechanism; do not substitute resource slots or memory-check integration for that enforcement.
  7. Preserve the run record. Keep the evaluation identity, model and harness versions, resource specification, build configuration, and test output together in the CI record or artifacts.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.