Skip to main content

emit_version_json

Function emit_version_json 

Source
pub fn emit_version_json()
Expand description

FALSIFY-GPUTRAIN-007 — emit apr --version --json output with the 3-key schema required by AC_GPUTRAIN_007_REQUIRED_VERSION_JSON_KEYS.

Schema:

{
  "name":    "apr",
  "version": "<semver>",
  "git_sha": "<commit>",
  "cuda_feature":           <bool>,   // was the binary built --features cuda?
  "cuda_runtime_available": <bool>,   // does cudaRuntimeGetVersion succeed?
  "visible_devices":        ["0", "1", ...]  // nvidia-smi -L indices, empty if no runtime
}

Consumers (entrenar::train::gputrain_007::verdict_from_version_json_keys and verdict_from_version_json_fields) parse this and assert schema completeness + field invariants (visible_devices.len() <= 16, no cuda_feature && !cuda_runtime_available inconsistency).