OE Agent“天工”新版本发布,请前往论坛顶部查看,欢迎试用并反馈~
查看OE-Skills
专栏算法工具链export模型报错IndexError: list index out of range

export模型报错IndexError: list index out of range

默认514562026-07-09
49
0

在J6M芯片上,calibration和qat训练都结束了,在导出模型export的时候,报错:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/tensor_dispatch_wrapper.py", line 275, in torch_function
    rets = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 938, in torch_function
    location = LocationManager.get(op=func, update_user_stack=True)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/location_info.py", line 307, in get
    mod_name, user_stack = self.loc_info_stack[-1]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/workspace/gcu4szh/SOP_remove_dynamic/train.py", line 1268, in <module>
    main()
  File "/usr/local/lib/python3.10/dist-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 355, in wrapper
    return f(*args, **kwargs)
  File "/workspace/gcu4szh/SOP_remove_dynamic/train.py", line 919, in main
    runquantization_stage(args)
  File "/workspace/gcu4szh/SOP_remove_dynamic/train.py", line 739, in runquantization_stage
    runexport_stage(
  File "/workspace/gcu4szh/SOP_remove_dynamic/train.py", line 641, in runexport_stage
    qat_hbir = hbir_export(
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/deprecate.py", line 284, in wrapped_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/typeguard.py", line 1096, in wrapper
    retval = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 230, in export
    ret = Exporter.export(
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 1313, in export
    FuncOp.from_py_func(*hbir_inputs, name=name)(forward)
  File "/usr/local/lib/python3.10/dist-packages/hbdk4/compiler/dialects/func.py", line 195, in decorator
    return_values = f(*func_args, **func_kwargs)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 1294, in forward
    tensor_struct_repr(JitTensor.get_base(ret))
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 666, in get_base
    "Gathered base tensors {}".format(tensor_struct_repr(base_tensors))
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/misc.py", line 61, in tensor_struct_repr
    x.dtype,
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/tensor_dispatch_wrapper.py", line 286, in torch_function
    + tensor_struct_repr((args, kwargs))
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/misc.py", line 61, in tensor_struct_repr
    x.dtype,
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/quantization/hbdk4/export_hbir/export_hbir.py", line 938, in torch_function
    location = LocationManager.get(op=func, update_user_stack=True)
  File "/usr/local/lib/python3.10/dist-packages/horizon_plugin_pytorch/utils/location_info.py", line 307, in get
    mod_name, user_stack = self.loc_info_stack[-1]
IndexError: list index out of range
算法工具链
技术深度解析征程6
评论0
0/600