Skip to content

[Infra][HIL] Hardware-in-the-Loop Profiling Rig #9

@copparihollmann

Description

@copparihollmann

Context

Performance tuning requires measuring cycle counts on real hardware (e.g., RISC-V boards). Currently, this involves manual scp, ssh, and parsing iree-benchmark-module output.

Objective

Create a HIL runner (src/tools/hil_runner.py) that treats remote hardware as a local execution function.

Scope of Work

  1. Device Manager: Abstraction for SSH/UART connection (using paramiko or pyserial).
    • Must handle "Copy Artifact" and "Execute Command".
  2. Profiler Wrapper:
    • Wraps iree-benchmark-module.
    • Parses standard stdout (benchmark_min_time, cpu_time) into JSON.
  3. Perf Lock: Ensures only one benchmark runs on the board at a time.

Acceptance Criteria

  • Test 1: Connection Check.
    • Input: Device IP/User in .env.
    • Success: Tool can run uname -a on the remote device and return the kernel version.
  • Test 2: End-to-End Profile.
    • Input: A compiled model.vmfb.
    • Condition: Run hil_runner.py --module model.vmfb.
    • Success: Returns a JSON object {"mean_latency_ms": 12.5, "peak_memory_kb": 4096} derived from the remote execution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions