NPU ResidencyOctober 13, 2026·7 min read

When Zero-Time Profiles Cannot Support Time-Weighted NPU Residency

A profiler can report where every layer was mapped and still give you no usable timing denominator. If your CI turns that into a confident time-share verdict, the gate is manufacturing evidence.

EdgeGate Team

EdgeGate Engineering Team

Edge AI CI/CD platform · Qualcomm AI Hub integration partners

The release rule

Recommended policy: require nonempty raw placement evidence, known placement for every reported row, zero CPU and GPU rows, and every reported row on NPU. This supports reported placement, not exclusive physical execution. EdgeGate's npu_compute_percent is time-weighted when total per-layer time is positive and count-weighted otherwise. Do not interpret the fallback as measured execution-time share. Missing execution detail remains unavailable.

Your model passed host-side evaluation. Can you prove it on the device? Qualcomm AI Hub can profile a compiled model on physical Qualcomm hardware and report latency, memory, and the mapping of model layers to compute units. That is the right raw material for a residency gate. It is not yet the gate.

The trap appears when a profile contains valid layer placement but every per-layer execution_time is zero. This shape occurs in profiles where placement is present but timing is not usable at layer granularity. Summing those values produces a zero denominator. A pipeline that silently divides, substitutes a default, or drops the record can turn an incomplete measurement into a false pass.

Two residency questions, not one

A useful profile answers two different questions:

  1. Placement: was any layer reported mapped to CPU or GPU instead of the NPU?
  2. Share: when timing exists, what fraction of measured layer time belonged to each compute unit?

These signals are complementary. Layer counts catch reported CPU or GPU mappings, but only checking every raw row catches missing or unrecognized placement. Time-weighted share shows the measured cost of that mapping. One CPU layer among 100 might look harmless by count while consuming most measured execution time. The reverse is also possible: several cheap CPU layers can hide inside an apparently strong NPU time share.

SignalSafe interpretationUseful gate
Complete placement and usable per-layer timesShare of reported measured layer time is measurablenpu_compute_percent >= policy
Zero per-layer times, complete placementPlacement is known; timed share is notEvery raw row on NPU; no CPU or GPU rows
Placement missing, empty, or unrecognizedResidency is unknownFail closed when residency is required

A concrete failure mode

Suppose a profile returns ten layer records:

[
  { "compute_unit": "NPU", "execution_time": 0 },
  ... nine more NPU rows ...
]

You can support the statement “10 of 10 layers were reported mapped to NPU.” You cannot support “100% of measured execution time was on the NPU,” because no positive layer time was measured. The number happens to be the same; the evidence behind it is not.

Now change one row to CPU. A placement gate should fail immediately: cpu_layer_count = 1. A broken time-only implementation sees ten zeros, learns nothing, and may keep the check green. The same logic applies to GPU rows: GPU-only and mixed NPU/GPU profiles fail an NPU-only placement policy. Both zero counts are necessary but insufficient. If one row lacks placement or names an unrecognized unit, the verdict must remain UNKNOWN even when the recognized rows are all NPU.

Current normalization behavior

EdgeGate preserves layer counts separately, but currently stores either the time-weighted or count-weighted result under the same npu_compute_percent metric. The normalized metric does not identify which method produced it; inspect the successfully persisted, SHA-256-addressed raw AI Hub profile before treating it as time-weighted evidence. When execution detail is absent or empty, the residency metrics are omitted so the gate resolves to “metric not available” instead of zero. Both aggregation helpers skip unrecognized compute units. Therefore total_layer_count counts only recognized rows: npu_layer_count == total_layer_count can be true while a raw row has unknown placement. Normalized count equality alone cannot establish completeness or enforce the recommended policy below.

# Current implementation aggregates recognized units only.
if recognized_layer_time > 0:
    share = time_by_unit / recognized_layer_time
elif recognized_layer_count > 0:
    share = layer_count_by_unit / recognized_layer_count
else:
    # Residency metrics are omitted.
    share = UNAVAILABLE

The fallback percentage is a placement summary, not retroactively measured time. When the raw profile is successfully persisted as a SHA-256-addressed artifact, a reviewer can inspect the timing denominator behind the normalized value. The release record should also preserve the gate threshold, verdict, and exact model and device identities so the reviewer can reconstruct why the merge passed or failed.

Recommended NPU-only placement policy

For a release requiring all reported layers to be mapped to NPU, validate raw evidence before using normalized summaries. This is recommended policy, not a claim that the current normalizer or gate evaluator implements it:

  • Complete reported placement: require nonempty raw execution detail and a recognized compute unit for every reported row. Missing or unrecognized placement stays UNKNOWN. Require the NPU row count to equal the raw row count, rather than the normalized total.
  • No off-NPU layers: block when cpu_layer_count > 0 or gpu_layer_count > 0. GPU fallback contradicts full-NPU placement the same way CPU fallback does.
  • Compute-share floor: treat npu_compute_percent as time-weighted only after confirming a positive timing denominator in the raw profile; also verify usable timing for every reported row. Otherwise keep measured time share UNKNOWN and evaluate placement separately using the complete raw-row policy.
  • No missing evidence: treat absent, empty, or unrecognized placement evidence as UNKNOWN, never PASS; fail closed when this evidence is required.
  • Output correctness: run on-device inference with fixed inputs and compare against the approved reference. Residency does not prove numerical parity.
  • Artifact binding: bind the result to the model hash, target device, runtime, profiler output, policy, and commit.
# Recommended policy over raw execution_detail, not normalized totals.
def reported_npu_placement(rows):
    if not isinstance(rows, list) or not rows:
        return "UNKNOWN"
    units = []
    for row in rows:
        if not isinstance(row, dict):
            return "UNKNOWN"
        unit = row.get("compute_unit")
        if not isinstance(unit, str) or unit.upper() not in {"NPU", "GPU", "CPU"}:
            return "UNKNOWN"
        units.append(unit.upper())
    cpu_count = units.count("CPU")
    gpu_count = units.count("GPU")
    npu_count = units.count("NPU")
    if cpu_count == 0 and gpu_count == 0 and npu_count == len(rows):
        return "PASS"
    return "FAIL"

All-NPU rows pass this reported-placement policy. GPU-only, mixed NPU/GPU, and CPU-containing rows fail. Missing, empty, or partially unknown rows remain UNKNOWN even when recognized rows are all NPU. A pass describes only reported layer mappings; it does not prove every physical operation, host task, or unreported operation ran on the NPU. Measured execution-time share remains a separate question.

Qualcomm documents AI Hub profiling and on-device inference as separate capabilities: profiling exposes performance and layer-to-compute-unit mapping, while inference verifies numerical correctness. Your release gate should preserve that separation. A model can have every reported layer mapped to NPU and still produce wrong outputs; it can also be numerically correct while falling back to CPU.

Sources and implementation notes

  • Qualcomm AI Hub documentation: physical-device profiling, layer mapping, latency, memory, and on-device numerical validation.
  • Qualcomm AI Hub Models: official examples that compile, profile, and evaluate models on hosted Qualcomm devices.
  • Profile normalizer: EdgeGate's normalizer aggregates AI Hub's per-layer execution_detail into time-weighted or count-weighted NPU/GPU/CPU percentages. It skips unrecognized compute units. When recognized per-layer time is positive, it divides time-by-unit by that recognized total. When timing is unavailable but layer counts are present, it falls back to layer_count_by_unit / total_layer_count. When neither is present, residency metrics are omitted so gates resolve to “Metric not available” rather than misleading zeros.
  • Zero-time profile fixture: EdgeGate's test suite includes a pinned AI Hub profile with all-zero per-layer execution_time and reported NPU mappings. This shape exercises the count-fallback path; it does not establish the raw-row completeness policy or turn count-based placement into measured time share.

Run the NPU residency check

See which operators are likely to remain on the Snapdragon NPU, then turn the result into a real-device merge gate with reviewable evidence.

Check NPU residency
© 2026 EdgeGate. Powered by Qualcomm AI Hub.