sensevoice推理报错
收藏回复举报
sensevoice推理报错
发表于2025-02-02 02:03:59
0 查看

参考昇腾仓库ACL_PyTorch/built-in/audio/SenseVoice · Ascend/ModelZoo-PyTorch - 码云 - 开源中国

在香橙派AI PRO上部署sensevoice发生错误

1、出现问题时,您做了哪些操作?

答复:执行推理代码

python3 infer_onnx.py --model_path=SenseVoiceSmall --om_path=model_linux_aarch64.om --device=0 --input="./SenseVoiceSmall/example/zh.mp3"

2、在哪个步骤出现了问题?

答复:acl.init失败

3、您希望得到什么结果?

答复:成功执行推理代码

4、您实际得到什么结果?

答复:

5、请附上您出现问题页面的整屏截图或者日志信息;

日志信息如下

答复:

(base) HwHiAiUser@orangepiaipro-20t:~/ModelZoo-PyTorch/ACL_PyTorch/built-in/audio/SenseVoice/SenseVoice$ python3 infer_onnx.py --model_path=SenseVoiceSmall --om_path=SenseVoice_linux_aarch64.om --device=0 --input="./SenseVoiceSmall/example/zh.mp3" --perform=True --loop=20 /home/HwHiAiUser/.local/lib/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:301: ImportWarning: ************************************************************************************************************* The torch.Tensor.cuda and torch.nn.Module.cuda are replaced with torch.Tensor.npu and torch.nn.Module.npu now.. The torch.cuda.DoubleTensor is replaced with torch.npu.FloatTensor cause the double type is not supported now.. The backend in torch.distributed.init_process_group set to hccl now.. The torch.cuda.* and torch.cuda.amp.* are replaced with torch.npu.* and torch.npu.amp.* now.. The device parameters have been replaced with npu in the function below: torch.logspace, torch.randint, torch.hann_window, torch.rand, torch.full_like, torch.ones_like, torch.rand_like, torch.randperm, torch.arange, torch.frombuffer, torch.normal, torch._empty_per_channel_affine_quantized, torch.empty_strided, torch.empty_like, torch.scalar_tensor, torch.tril_indices, torch.bartlett_window, torch.ones, torch.sparse_coo_tensor, torch.randn, torch.kaiser_window, torch.tensor, torch.triu_indices, torch.as_tensor, torch.zeros, torch.randint_like, torch.full, torch.eye, torch._sparse_csr_tensor_unsafe, torch.empty, torch._sparse_coo_tensor_unsafe, torch.blackman_window, torch.zeros_like, torch.range, torch.sparse_csr_tensor, torch.randn_like, torch.from_file, torch._cudnn_init_dropout_state, torch._empty_affine_quantized, torch.linspace, torch.hamming_window, torch.empty_quantized, torch._pin_memory, torch.autocast, torch.load, torch.Generator, torch.set_default_device, torch.Tensor.new_empty, torch.Tensor.new_empty_strided, torch.Tensor.new_full, torch.Tensor.new_ones, torch.Tensor.new_tensor, torch.Tensor.new_zeros, torch.Tensor.to, torch.nn.Module.to, torch.nn.Module.to_empty ************************************************************************************************************* warnings.warn(msg, ImportWarning) /home/HwHiAiUser/.local/lib/python3.9/site-packages/torch_npu/contrib/transfer_to_npu.py:260: RuntimeWarning: torch.jit.script and torch.jit.script_method will be disabled by transfer_to_npu, which currently does not support them, if you need to enable them, please do not use transfer_to_npu. warnings.warn(msg, RuntimeWarning) Loading remote code successfully: model [ERROR] acl init failed [INFO] open device 0 success [ERROR] load model from file failed, model file is SenseVoice_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 "/home/HwHiAiUser/ModelZoo-PyTorch/ACL_PyTorch/built-in/audio/SenseVoice/SenseVoice/infer_onnx.py", line 113, in <module> om_sess = InferSession(args.device, args.om_path) 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] [W compiler_depend.ts:305] Warning: NPU warning, error code is 107003[Error]: [Error]: The stream is not in the current context. Check whether the context where the stream is located is the same as the current context. EE9999: Inner Error! EE9999: [PID: 39861] 2025-02-02-01:20:12.009.649 Stream destroy failed, stream is not in current ctx, stream_id=1.[FUNC:StreamDestroy][FILE:api_impl.cc][LINE:1096] TraceBack (most recent call last): rtStreamDestroyForce execute failed, reason=[stream not in current context][FUNC:FuncErrorReason][FILE:error_message_manage.cc][LINE:53] destroy stream force failed, runtime result = 107003[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:161] (function operator()) [ERROR] 2025-02-02-01:20:14 (PID:39861, Device:0, RankID:-1) ERR99999 UNKNOWN application exception

本帖最后由 匿名用户2025/02/05 14:21:26 编辑

我要发帖子