Product & Environment
- Compiler Version: 1.2
- OS: Docker (mobilint/qbcomplier:1.0-cuda12.8.1-ubuntu22.04)
Description
- SAM2 기반의 semantic segmentation 모델을 컴파일 하고 있습니다.
.onnx를 .mblt로 변환 자체는 되는데, 문제는 input과 output이 onnx와 다르게 나옵니다.
컴파일 시 사용한 코드
from qbcompiler import mxq_compile_V2
if __name__ == "__main__":
mxq_compile_V2(
model = "./sam2unext.onnx",
target_device="aries-rb",
calib_data_path="./calibration/crack_model",
save_path="./sam2unext.mxq",
backend="onnx",
device="gpu",
inference_scheme="all",
image_channels = 3,
)
기대하는 input: [1, 3, 1024, 1024]
기대하는 output: [1, 1, 1024, 1024]
- .mblt의 inputs과 outputs
[Parser]
Number of Subgraphs: 1
graph order: [0]
subgraph DAG: persisted (0 edges, 1 parallel levels)
DAG levels (parallel groups):
L0: [sg0]
stateful_lstm_subgraphs: {}
backend: onnx
model inputs:
- name: add_25, src_shape: (1,1,1025,384)
- name: /0/sam/blocks.0/Add_output_0, src_shape: (1,256,256,96)
- name: 4_0/reshape, src_shape: (1,1024,64,96)
- name: /0/dino/blocks.0/attn/Split_1/reshape_0/reshape/transpose, src_shape: (1,6,1025,64)
- name: mul_23/reshape, src_shape: (1,1024,96,64)
- name: mul_130/reshape, src_shape: (1,1024,64,96)
- name: mul/transpose, src_shape: (1,6,64,1025)
- name: mul/transpose_0, src_shape: (1,6,1025,64)
model outputs:
- name: /0/sam/blocks.0/block/Add_3_output_0, src_shape: (1,256,256,96)
- name: /0/sam/blocks.1/block/norm1/LayerNormalization_output_0/ordered_patchify/conv2d, src_shape: (1,1024,64,576)
- name: /0/sam/blocks.1/block/pool/MaxPool_output_0, src_shape: (1,128,128,192)
- name: add_0, src_shape: (1,1,1025,384)
- name: /0/dino/blocks.0/Add_1_output_0/reshape/layernorm/conv2d, src_shape: (1,1,1025,1152)
2026-07-27 16:29:15 | INFO | mblt.qbcompiler.model_dict_new.parser.parser | Write mblt: /tmp/qbcompiler/compiler_v2/qbc-v2-b7f0a254-607c-465f-84ad-13a3b7ee5e1e/intermediate.mblt
Logs & Attachments
위 코드를 바탕으로 .onnx를 얻어 컴파일을 시도했습니다.