Skip to content

[Bug][CV181X] model_deploy.py crash: std::out_of_range (index 65536) during Address Assign #262

Description

@AS2818

Describe the bug

When deploying an LPRNet model to CV181X (SG2002) using any quantization mode (F16/BF16/INT8), the compiler (tpuc-opt) crashes during the address assignment phase.

Environment

  • TPU-MLIR Version: v1.27-20260206
  • Chip: cv181x (SG2002 / MaixCam)
  • OS: Docker sophgo/tpuc_dev:v3.1
  • Python: 3.10

Error Message

terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 65536) >= this->size() (which is 65536)

Steps to Reproduce

  1. Convert the attached ONNX to MLIR (Success).
  2. Run model_deploy:
    model_deploy.py --mlir lprnet_no_pool.mlir --quantize F16 --chip cv181x --model test.cvimodel

Observations

The crash happens at the very last step: --address-assign. It seems like a counter or array index in the backend backend-compiler is overflowing (hitting the 2^16 limit).

Attached Files

error.log.txt

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