Skip to content

Multi-TPU fails with MobileNet large #19

@Daniel15

Description

@Daniel15

CodeProject.AI Server info

Server version:   2.9.7
System:           Docker (b8c4699aeb25)
Operating System: Linux (Ubuntu 22.04 Jammy Jellyfish)
CPUs:             13th Gen Intel(R) Core(TM) i5-13500 (Intel)
                  1 CPU x 14 cores. 20 logical processors (x64)
System RAM:       125 GiB
Platform:         Linux
BuildConfig:      Release
Execution Env:    Docker
Runtime Env:      Production
Runtimes installed:
  .NET runtime:     9.0.0
  .NET SDK:         Not found
  Default Python:   3.10.12
  Go:               Not found
  NodeJS:           Not found
  Rust:             Not found
Video adapter info:
System GPU info:
  GPU 3D Usage       0%
  GPU RAM Usage      0
Global Environment variables:
  CPAI_APPROOTPATH = <root>
  CPAI_PORT        = 32168

Describe the bug
When using the MobileNet large model (and possibly others) and the "Multi-TPU Support" option is enabled, it fails to initialize:

17:07:00:objectdetection_coral_adapter.py: ERROR:root:TFLite file /app/modules/ObjectDetectionCoral/assets/all_segments_tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite doesn't exist
17:07:00:objectdetection_coral_adapter.py: WARNING:root:Model file not found: [Errno 2] No such file or directory: '/app/modules/ObjectDetectionCoral/assets/all_segments_tf2_ssd_mobilenet_v1_fpn_640x640_coco17_ptq_segment_0_of_2_edgetpu.tflite'
17:07:00:objectdetection_coral_adapter.py: WARNING:root:No Coral TPUs found or able to be initialized. Using CPU.
17:07:00:objectdetection_coral_adapter.py: WARNING:root:Unable to load delegate for TPU cpu: Failed to load delegate from libedgetpu.so.1
17:07:00:objectdetection_coral_adapter.py: WARNING:root:Unable to create interpreter for CPU using edgeTPU library: cpu
17:07:00:objectdetection_coral_adapter.py: Using PIL for image manipulation (Either OpenCV or numpy not available for this module)
17:07:00:objectdetection_coral_adapter.py: TPU detected
17:07:00:objectdetection_coral_adapter.py: Attempting multi-TPU initialisation
17:07:00:objectdetection_coral_adapter.py: Failed to init multi-TPU. Falling back to single TPU.
17:07:00:objectdetection_coral_adapter.py: Using Edge TPU

Falling back to a single TPU works fine, and the single TPU also initializes correctly when Multi-TPU support is disabled.

To Reproduce
Steps to reproduce the behavior:

  1. Install dual-edge TPU
  2. Enable multi-TPU mode
  3. Download MobileNet Large model
  4. Use MobileNet Large model

Expected behavior
It works with no errors

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