[bug] python -m qbcompiler cannot produce the .mxq model

Product & Environment

  • Product: MLX-A1
  • Compiler Version: 1.2.0
  • OS: (container) mobilint/qbcompiler:1.2-cpu-ubuntu22.04

Description

The quantize and compile subcommands of python -m qbcompiler fail and the CLI cannot produce the .mxq model. Also the failure is not logged to the terminal.

I have confirmed the Python API (qbcompiler.mxq_compile) works fine.

Logs & Attachments

$ python3 -m qbcompiler compile --model simple-conv.onnx --backend onnx \
>     --target-device aries-rb --output y.mxq --use-random-calib
[2026-08-05 12:53:05] qbcompiler.model_dict.common._reshape_util.reshape_check : [INFO] Parser is configured to use reshape_check_util (Python implementation).
2026-08-05 12:53:06 | WARNING | mblt.mblt.operator.activation_functions | ACTIVATION_FUNCTIONS and _OPS_PER_INPUT_ELEMENT keys mismatch: missing=['InverseSigmoid'], extra=[]
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.backend.onnx.load_onnx_model | LOAD simple-conv.onnx, onnx opset=17, ir_version=8
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.backend.onnx.inference | run onnx inference session
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.backend.onnx.inference | onnx inference session done.
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.backend.onnx.onnx_graph_builder | onnx opset=17, ir_version=8 optypes={'Relu', 'Conv'}
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.parser | 



==================================================================
              Summary by Operator Type[Model Loaded]               
==================================================================
    OpType     | Count | Unsupported | Supported(%) | GOPS | GMAC 
---------------+-------+-------------+--------------+------+------
Convolution    |      1|            1|           0.0|  3.70|  1.85
Input          |      1|            1|           0.0|  0.00|  0.00
InputConstant  |      2|            2|           0.0|  0.00|  0.00
Output         |      1|            1|           0.0|  0.00|  0.00
Relu           |      1|            1|           0.0|  0.00|  0.00
Transpose      |      2|            2|           0.0|  0.00|  0.00
---------------+-------+-------------+--------------+------+------
All            |      8|            8|           0.0|  3.70|  1.85
==================================================================



2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.transform.strip_yolo_decode_transform | Applying YOLO decode removal rules.
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.transform.strip_yolo_decode_transform | ================ [OPTIMIZE stage=yolo decode removal, num_ops=8] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | optimize_level=999.
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=1, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=2, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=3, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=4, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=5, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=6, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=7, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=8, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.mblt.transform.basic_transform | ================ [OPTIMIZE stage=9, num_ops=6] ================
2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.parser | 



================================================================
 Summary by Operator Type[HL compilation done. Device=aries-rb]  
================================================================
   OpType    | Count | Unsupported | Supported(%) | GOPS | GMAC 
-------------+-------+-------------+--------------+------+------
Convolution  |      1|            0|         100.0|  3.70|  1.85
Input        |      1|            1|           0.0|  0.00|  0.00
Output       |      1|            1|           0.0|  0.00|  0.00
Relu         |      1|            0|         100.0|  0.00|  0.00
Transpose    |      2|            2|           0.0|  0.00|  0.00
-------------+-------+-------------+--------------+------+------
All          |      6|            4|         33.33|  3.70|  1.85
================================================================



2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.parser | 

[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: images_channel_last, src_shape: (1,224,224,3)
model outputs:
  - name: c0_channel_last/relu, src_shape: (1,224,224,16)

2026-08-05 12:53:06 | INFO | mblt.qbcompiler.model_dict_new.parser.parser | Write mblt: /tmp/qbc-compile-jzwhf1qy/intermediate.mblt

$ echo $?
1

$ ls -l y.mxq
ls: cannot access 'y.mxq': No such file or directory

simple-conv.onnx (2.0 KB)

Based on the shipped wheel source looks like _invoke_quantize() is not passing target_device appropriately

    from qbcompiler import mxq_compile_with_callback_V2 as _impl
    try:
        _impl(
            model=mblt,
            save_path=output,
            device=device,
            calib_data_path=calib_data_path,
            use_random_calib=use_random_calib,
            config_preset=config_preset,
            compile_config=compile_config,
            progress_callback=progress_callback,
        )

v1.2 manual에 cli 사용 예시가 있는데 인자 전달이 올바르게 되지 않은 버그입니다. 다음 릴리즈에서 수정 될 예정입니다.