使用 Toolchain docker Web GUI 發生問題

使用文件的 WebGUI evaluator only 的時候報錯


進到 Service 嘗試安裝卻說已經有這個套件了


Comments

  • 看起來錯誤是因為沒有填入model id所造成的,除了模型onnx檔案之外,model id, version與量化用的圖片也都要輸入喔

  • UI 可以在改善看看 start 的時候沒跳出必填,

    另外一個就是我直接使用 yolov5 export 出來的模型 會報這樣的錯誤

    https://i.imgur.com/ONLb06e.png

    running compiler and IP evaluator...

    Compiler config generated.

    [common][error][hw_utils.cc:109][GetFmtParam] Unsupported data format RAW8

    Cmd exec error: exit status 1,

    /workspace/miniconda/lib/python3.7/site-packages/numpy/__init__.py:156: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service

     from . import _distributor_init

    Using TensorFlow backend.

    Cannot inference all shapes. If no other error is raised, please ignore this message.

    Cannot inference all shapes. If no other error is raised, please ignore this message.

    Cannot inference all shapes. If no other error is raised, please ignore this message.

    terminate called after throwing an instance of 'std::out_of_range'

     what(): map::at

    ./compilerIpevaluator_520.sh: line 32:  55 Aborted         (core dumped) $LIBS_FOLDER/compiler/compile 520 $model $TMP_FOLDER/config_compiler.json warning compile.log

    Traceback (most recent call last):

     File "scripts/onnxFlow.py", line 67, in <module>

      eval_result = km.evaluate()

     File "/workspace/miniconda/lib/python3.7/site-packages/ktc/toolchain.py", line 128, in evaluate

      subprocess.run(['./compilerIpevaluator_520.sh', input_model_path], check=True)

     File "/workspace/miniconda/lib/python3.7/subprocess.py", line 512, in run

      output=stdout, stderr=stderr)

    subprocess.CalledProcessError: Command '['./compilerIpevaluator_520.sh', '/data1/input.onnx']' returned non-zero exit status 1.

  • 使用 code 去跑會出現這個問題

    dummy_input = torch.randn(1, 3, 640, 640)
    model_id = 32769
    version = '0001'
    platform = '520'
    onnx_load_path = 'yolov5_model/yolov5s.onnx'
    onnx_save_path = 'yolov5_model/yolov5s-opt.onnx'
    if __name__ == '__main__':
        exported_m = onnx.load(onnx_load_path)
        print('onnx model loaded')
        optimized_m = ktc.onnx_optimizer.onnx2onnx_flow(exported_m, eliminate_tail=True, opt_matmul=False, disable_fuse_bn=True)
        print('complete optimize')
        onnx.save(optimized_m, onnx_save_path)
        print('complete save model')
    
        print('Evaluation')
        km = ktc.ModelConfig(model_id, version, platform, onnx_path=onnx_save_path)
        eval_result = km.evaluate()
    

    terminate called after throwing an instance of 'std::out_of_range'

     what(): map::at

    ./compilerIpevaluator_520.sh: line 32:  84 Aborted         (core dumped) $LIBS_FOLDER/compiler/compile 520 $model $TMP_FOLDER/config_compiler.json warning compile.log

    Traceback (most recent call last):

     File "test_script.py", line 24, in <module>

      eval_result = km.evaluate()

     File "/workspace/miniconda/lib/python3.7/site-packages/ktc/toolchain.py", line 128, in evaluate

      subprocess.run(['./compilerIpevaluator_520.sh', input_model_path], check=True)

     File "/workspace/miniconda/lib/python3.7/subprocess.py", line 512, in run

      output=stdout, stderr=stderr)

    subprocess.CalledProcessError: Command '['./compilerIpevaluator_520.sh', '/docker_mount/convert_script/yolov5_model/yolov5s-opt.onnx']' returned non-zero exit status 1.

    (base) root@65a275970522:/docker_mount/convert_script# 

  • edited July 2022

    @johnson luo

    Hi johnson luo,

    您是否可以提供您 export 出來的 yolov5s.onnx 與 yolov5s-opt.onnx,方便找出現錯誤訊息原因。

  • @Andy Hsieh

    已回覆在另一篇,謝謝!

The discussion has been closed due to inactivity. To continue with the topic, please feel free to post a new discussion.