Skip to content

GroundingDino在chip bm1688下模型转换不成功是什么原因 #159

@coolhaiyang

Description

@coolhaiyang

在bm1688下模型转换不成功,
模型转换命令如下
model_deploy --mlir GroundingDino.mlir --quantize F16 --chip bm1688 --model GroundingDino_bm1688_fp16.bmodel
但如果把--chip bm1688修改成bm1684x又是正确的
报了如下错误
[0][ERR] [0]/workspace/nntoolchain/TPU1686/firmware_core/src/global_layer/nodechip_bcbinary.c:810: nodechip_bcbinary_fp_with_stride: Assertion "0 && "local memory allocation failed without split\n"" failed.
Obtained 10 stack frames.
/usr/local/lib/python3.10/dist-packages/tpu_mlir/lib/libbackend_1688.so(__print_trace+0x2c) [0x7fd19a15632c]
/usr/local/lib/python3.10/dist-packages/tpu_mlir/lib/libbackend_1688.so(nodechip_bcbinary_fp_with_stride+0x2386) [0x7fd199d64f06]
/usr/local/lib/python3.10/dist-packages/tpu_mlir/lib/libbackend_1688.so(nodechip_bcbinary_fp+0x61) [0x7fd199d65b61]
/usr/local/lib/python3.10/dist-packages/tpu_mlir/lib/libbackend_1688.so(api_eltbinary_global+0x1d5) [0x7fd199cf9b95]
/usr/local/lib/python3.10/dist-packages/tpu_mlir/lib/libbackend_1688.so(backend_api_bcbinary_global+0xa2) [0x7fd199c63022]
tpuc-opt(+0x11b4a51) [0x558162e0ca51]
tpuc-opt(+0x1109e0a) [0x558162d61e0a]
tpuc-opt(+0x12a0051) [0x558162ef8051]
tpuc-opt(+0x129723f) [0x558162eef23f]
tpuc-opt(+0x1296a07) [0x558162eeea07]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/tpu_mlir/python/tools/model_deploy.py", line 628, in
tpu_patterns = tool.build_model()
File "/usr/local/lib/python3.10/dist-packages/tpu_mlir/python/tools/model_deploy.py", line 381, in build_model
patterns = mlir_to_model(
File "/usr/local/lib/python3.10/dist-packages/tpu_mlir/python/utils/mlir_shell.py", line 963, in mlir_to_model
_os_system(cmd, log_level=log_level)
File "/usr/local/lib/python3.10/dist-packages/tpu_mlir/python/utils/mlir_shell.py", line 435, in _os_system
raise RuntimeError("[!Error]: {}".format(cmd_str))
RuntimeError: [!Error]: tpuc-opt GroundingDino_bm1688_f16_final.mlir --codegen="model_file=GroundingDino_bm1688_fp16.bmodel embed_debug_info=False model_version=latest bmodel_only=False gdma_check=True" -o /dev/null

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