Skip to content

Unable to initialize INA power monitor on AKD1000 #22

@baekchaesun

Description

@baekchaesun

@tengomucho @kmaincent @hcodina @avaliente-bc @rchevalier-brainchip @ktsiknos-brainchip
Hi, I am using an AKD1000 PCIe accelerator with a Raspberry Pi 5 running Ubuntu Desktop ARM64.

Environment:

  • Host board: Raspberry Pi 5
  • OS: Ubuntu Desktop ARM64
  • Python: Python 3.12
  • Python environment: venv
  • AKD1000 driver repository: https://github.com/Brainchip-Inc/akida_dw_edma
  • Driver branch: master
  • Driver module: akida_pcie
  • Device node: /dev/akida0
  • Python package: akida runtime installed via pip
  • Hardware: BrainChip AKD1000 PCIe accelerator
  • lspci output includes:
    BrainChip Inc AKD1000 NN coprocessor rev 01

Current status is below.
The AKD1000 device itself is detected and hardware inference works correctly.

I confirmed it is working

  • lspci detects the AKD1000 PCIe device
  • /dev/akida0 exists
  • akida devices detects the device
  • model.map(device, hw_only=True) succeeds
  • Hardware-only inference runs successfully
  • Inference statistics are printed normally
    • Average framerate is reported, e.g. around 91.8 FPS
    • Last inference clock is reported
    • Last program clock is reported

The Problem is
Power measurement fails when enabling the SoC power monitor.

Code:

device.soc.power_measurement_enabled = True

Error:

RuntimeError: Unable to init INA: failed to send to bus: -2

After this error:

  • device.soc.power_meter is None
  • floor power cannot be read
  • power event count is 0
  • avg_power_mw remains null
  • energy_per_frame remains null

I also observed that power_measurement_enabled may appear as true after setting it, but this does not seem reliable because the setter already failed with the INA initialization error and the actual power_meter object remains None.

Additional error observed when trying to print floor power:

TypeError: unsupported format string passed to NoneType.__format__

This seems to be a secondary error caused by floor power being None.

I already tried,

  1. Reinstalled the akida_dw_edma PCIe driver from the master branch.
  2. Removed old driver/module remnants before reinstalling.
  3. Confirmed that the active driver is the newer akida_pcie driver, not the old pedd_bc driver.
  4. Rebooted the system after driver installation.
  5. Checked that /dev/akida0 exists.
  6. Checked that the AKD1000 device is detected by akida devices.
  7. Checked for other processes using /dev/akida0.
  8. Confirmed that inference itself works in hardware-only mode.
  9. Confirmed that input dtype is not the issue by using uint8 input.
  10. Confirmed that inference duration is not the issue by running inference for several minutes.
  11. Confirmed that FPS and inference clock statistics are produced normally.

So the issue seems isolated to INA power monitor initialization, not AKD1000 inference itself.

--

Is INA-based power measurement supported on Raspberry Pi 5 + AKD1000 PCIe accelerator with the current akida_dw_edma master driver on Ubuntu ARM64?

If it is supported, are there any additional board-specific steps required, such as

  • kernel configuration changes
  • driver source modifications
  • Raspberry Pi PCIe configuration
  • I2C/bus configuration
  • power monitor initialization settings
  • specific akida runtime version requirements

Any guidance would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions