edgetpu.basic.edgetpu_utils

General utility APIs.

Constants

edgetpu.basic.edgetpu_utils.EDGE_TPU_STATE_ASSIGNED

Used with ListEdgeTpuPaths() to list Edge TPU devices that are already associated with an instance of an inference engine (a BasicEngine).

edgetpu.basic.edgetpu_utils.EDGE_TPU_STATE_UNASSIGNED

Used with ListEdgeTpuPaths() to list Edge TPU devices that are currently available.

edgetpu.basic.edgetpu_utils.EDGE_TPU_STATE_NONE

Used with ListEdgeTpuPaths() to list all known Edge TPU devices.

edgetpu.basic.edgetpu_utils.SUPPORTED_RUNTIME_VERSION

The Edge TPU runtime version that’s required by this Edge TPU library.

Functions

edgetpu.basic.edgetpu_utils.ListEdgeTpuPaths(state)

Lists the paths for all available Edge TPU devices.

Parameters:state (int) – The current state of devices you want to list. It can be one of EDGE_TPU_STATE_ASSIGNED, EDGE_TPU_STATE_UNASSIGNED, or EDGE_TPU_STATE_NONE.
Returns:A tuple of strings, each representing a device path.
edgetpu.basic.edgetpu_utils.GetRuntimeVersion()

Returns the Edge TPU runtime (libedgetpu.so) version.

Compare this version to the value of SUPPORTED_RUNTIME_VERSION, which is the runtime version required by your Edge TPU library version.

This runtime version is dynamically retrieved from the shared object.

Returns:A string for the version name.