ATC命令及结果如下
(Ascend) root@is-dau5hkvezctnl5fz-devmachine-0:/mnt/public/yixiaojie/DINOv# atc --framework=5 \
--model=/mnt/public/yixiaojie/dinov/onnx/dinov_swinL1_fixed.onnx \
--output=/mnt/public/yixiaojie/dinov/om/dinov_swinL1-310B1 \
--input_shape="tgt_image:1,3,672,672;rand_shape:1,1,672,672" \
--soc_version=Ascend310B1 \
--host_env_os=linux \
--host_env_cpu=aarch64
ATC start working now, please wait for a moment.
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: set_tiling_params does not take effect because get_op_mode is dynamic
...
ATC run success, welcome to the next use.
在310B上推理如下:
(base) root@orangepiaipro-20t:/home/yixiaojie/dinov# python -m ais_bench --model ./dinov_swinL1-310B1_linux_aarch64.om --output ./ --output_dirname resultdinov --outfmt TXT --batchsize 1 --warmup_count 1 --loop 10 --profiler 1
[INFO] msprof cmd:/usr/local/Ascend/ascend-toolkit/latest/bin/msprof --output=.//profiler --application="/usr/local/miniconda3/bin/python /usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/__main__.py --model ./dinov_swinL1-310B1_linux_aarch64.om --output ./ --output_dirname resultdinov --outfmt TXT --batchsize 1 --warmup_count 1 --loop 10 --profiler 1 --profiler=0 --warmup_count=0" --model-execution=on --sys-hardware-mem=on --sys-cpu-profiling=off --sys-profiling=off --sys-pid-profiling=off --dvpp-profiling=on --runtime-api=on --task-time=on --aicpu=on begin run
[INFO] Start profiling...
[INFO] acl init success
[INFO] open device 0 success
E19999: Inner Error!
E19999: 2025-06-12-14:46:19.695.051 Failed to execute init graph[FUNC:Load][FILE:model_v2_executor.cc][LINE:171]
TraceBack (most recent call last):
[Model][FromData]call load executorV2 failed, ge result[1343225857][FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161]
[ERROR] load model from file failed, model file is /home/yixiaojie/dinov/dinov_swinL1-310B1_linux_aarch64.om
[WARN] Check failed:processModel->LoadModelFromFile(modelPath), ret:1
[WARN] no model had been loaded, unload failed
Traceback (most recent call last):
File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/__main__.py", line 3, in <module>
exec(open(os.path.join(cur_path, "infer/__main__.py")).read())
File "<string>", line 448, in <module>
File "<string>", line 285, in main
File "<string>", line 53, in init_inference_session
File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/infer/interface.py", line 26, in __init__
self.session = aclruntime.InferenceSession(self.model_path, self.device_id, options)
RuntimeError: [1][ACL: invalid parameter]
[INFO] end to destroy context
[INFO] end to reset device is 0
不知道是什么原因,应该是我的onnx文件的问题,还是ATC的问题呢
ATC命令及结果如下
(Ascend) root@is-dau5hkvezctnl5fz-devmachine-0:/mnt/public/yixiaojie/DINOv# atc --framework=5 \
--model=/mnt/public/yixiaojie/dinov/onnx/dinov_swinL1_fixed.onnx \
--output=/mnt/public/yixiaojie/dinov/om/dinov_swinL1-310B1 \
--input_shape="tgt_image:1,3,672,672;rand_shape:1,1,672,672" \
--soc_version=Ascend310B1 \
--host_env_os=linux \
--host_env_cpu=aarch64
ATC start working now, please wait for a moment.
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: tiling offset out of range, index: 32
Warning: set_tiling_params does not take effect because get_op_mode is dynamic
...
ATC run success, welcome to the next use.
在310B上推理如下:
(base) root@orangepiaipro-20t:/home/yixiaojie/dinov# python -m ais_bench --model ./dinov_swinL1-310B1_linux_aarch64.om --output ./ --output_dirname resultdinov --outfmt TXT --batchsize 1 --warmup_count 1 --loop 10 --profiler 1
[INFO] msprof cmd:/usr/local/Ascend/ascend-toolkit/latest/bin/msprof --output=.//profiler --application="/usr/local/miniconda3/bin/python /usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/__main__.py --model ./dinov_swinL1-310B1_linux_aarch64.om --output ./ --output_dirname resultdinov --outfmt TXT --batchsize 1 --warmup_count 1 --loop 10 --profiler 1 --profiler=0 --warmup_count=0" --model-execution=on --sys-hardware-mem=on --sys-cpu-profiling=off --sys-profiling=off --sys-pid-profiling=off --dvpp-profiling=on --runtime-api=on --task-time=on --aicpu=on begin run
[INFO] Start profiling...
[INFO] acl init success
[INFO] open device 0 success
E19999: Inner Error!
E19999: 2025-06-12-14:46:19.695.051 Failed to execute init graph[FUNC:Load][FILE:model_v2_executor.cc][LINE:171]
TraceBack (most recent call last):
[Model][FromData]call load executorV2 failed, ge result[1343225857][FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161]
[ERROR] load model from file failed, model file is /home/yixiaojie/dinov/dinov_swinL1-310B1_linux_aarch64.om
[WARN] Check failed:processModel->LoadModelFromFile(modelPath), ret:1
[WARN] no model had been loaded, unload failed
Traceback (most recent call last):
File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/__main__.py", line 3, in <module>
exec(open(os.path.join(cur_path, "infer/__main__.py")).read())
File "<string>", line 448, in <module>
File "<string>", line 285, in main
File "<string>", line 53, in init_inference_session
File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/infer/interface.py", line 26, in __init__
self.session = aclruntime.InferenceSession(self.model_path, self.device_id, options)
RuntimeError: [1][ACL: invalid parameter]
[INFO] end to destroy context
[INFO] end to reset device is 0
不知道是什么原因,应该是我的onnx文件的问题,还是ATC的问题呢