多线程使用npu推理模型问题
收藏回复举报
多线程使用npu推理模型问题
新人帖
发表于2025-03-10 15:37:34
0 查看
我使用多线程在子线程中出现npu推理模型问题,报错内容为Exception in thread Thread-1:

Traceback (most recent call last):

  File "/home/HwHiAiUser/Desktop/UDP_Dectet/YUNTAI_UDP_Dectet.py", line 220, in video_thread

    Vido.dectet(rtsp_url)  # 确保该函数使用ACL上下文

  File "/home/HwHiAiUser/Desktop/UDP_Dectet/Vido.py", line 99, in dectet

    processed_frame = process_frame(frame)

  File "/home/HwHiAiUser/Desktop/UDP_Dectet/Vido.py", line 33, in process_frame

    outputs = model.infer(feeds=blob, mode="static")

  File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/infer/interface.py", line 162, in infer

    return self.run(inputs, out_array=True)

  File "/usr/local/miniconda3/lib/python3.9/site-packages/ais_bench/infer/interface.py", line 94, in run

    outputs = self.session.run(self.outputs_names, inputs)

RuntimeError: [-1][ACL: general failure]

本帖最后由 匿名用户2025/11/28 17:49:37 编辑

我要发帖子