Skip to content

HPDBN SDK Integration Guide

The EvoSpikeNet-Core HPDBN contract can be consumed from the SDK without replacing existing DevicePlugins.

Connect an existing plugin

from evospikenet.hpdbn import DevicePluginRuntimeAdapter, SelectedPath

runtime = DevicePluginRuntimeAdapter(
    plugin,
    {SelectedPath.LOCAL_SNN: "run_g_quat"},
)

if runtime.available(SelectedPath.LOCAL_SNN):
    result = runtime.run(SelectedPath.LOCAL_SNN, payload)

paths maps HPDBN paths to execution methods exposed by an existing plugin. G-QuAT, NorthPole, and Loihi vendor-specific behavior remains in the existing plugin; HPDBN owns deadline, path-selection, and availability contracts.

A plugin with runtime_available=False is not used as a physical runtime even when it has a simulator fallback. Make simulation explicit in configuration and logs.

Run the example

Use the following sample in the Core repository to verify the same contract:

cd EvoSpikeNet-Core
PYTHONPATH=. python examples/sdk/hpdbn_existing_plugin_bridge.py

Combine with external optimization

External QUBO, quantum, cloud, and ground-GPU solvers are not replacements for urgent local inference. Problem and solution validation follows the envelope, input hash, plan generation, deadline, authentication, and constraint checks in HPDBN External Optimization.

Responsibility boundary

  • Core: LocalHPDBNNode, PfcInput, PfcDecision, RuntimeAdapter, and basic peer-summary validation
  • Existing DevicePlugin: vendor runtime discovery, tensor execution, and device-specific conversion
  • Application: sensor adapters, Safety Barrier, control, watchdogs, and power, temperature, and memory monitoring

Native CPU Backend

For CPU production inference, add NativeCPUBackend as a LOCAL_CPU candidate while keeping existing DevicePlugins. Do not expose Torch tensors directly through the SDK contract; keep conversions between native arrays, Torch tensors, and NumPy arrays inside the runtime adapter.

Enable the native backend only after it can load existing checkpoints, roll back to the Torch path, and pass output, spike-count, attention-weight, and p95-latency comparisons with identical inputs and weights. Follow the Native CPU Runtime Migration Plan.

HPDBN is not a certified safety-control implementation for aircraft, vehicles, or robots.