pythorch在线推理不支持数组的逻辑运算,在CPU上测试是支持的
访问这个数据就会报错sorted_indices[sorted_indices_to_remove]其中
sorted_indices_to_remove为tensor([False, False, False, ..., True, True, True], device='npu:0')
sorted_indices[]为tensor([ 674, 862, 1399, ..., 23, 24, 25], device='npu:0')
Traceback (most recent call last):
File "generate.py", line 286, in
main()
File "generate.py", line 251, in main
temperature=temperature, top_k=topk, top_p=topp, repitition_penalty=repetition_penalty, device=device
File "generate.py", line 183, in generate
repitition_penalty=repitition_penalty, device=device)
File "generate.py", line 139, in sample_sequence
filtered_logits = top_k_top_p_filtering(next_token_logits, top_k=top_k, top_p=top_p)
File "generate.py", line 91, in top_k_top_p_filtering
sorted_indices[sorted_indices_to_remove]
RuntimeError: Run:/home/HwHiAiUser/wubo/pytorch/aten/src/ATen/native/npu/frame/OpParamMaker.cpp:32 NPU error,NPU error code is:507018
E39999: Inner Error!
Aicpu kernel execute failed, device_id=0, stream_id=1, task_id=1337, fault so_name=libpt_kernels.so, fault kernel_name=RunCpuKernel, extend_info=[FUNC:GetError][FILE:stream.cc][LINE:697]
Stream synchronize failed, stream = 0x5565148ae940[FUNC:StreamSynchronize][FILE:logger.cc][LINE:271]
rtStreamSynchronize execute failed, reason=[aicpu exception][FUNC:ReportFuncErrorReason][FILE:error_message_manage.cc][LINE:26]
Call rtStreamSynchronize(stream) fail, ret: 0x7BC8A[FUNC:LaunchKernel][FILE:op_task.cc][LINE:955]
[Exec][Op]Execute op failed. ge result = 36114152[FUNC:ReportCallError][FILE:log_inner.cpp][LINE:134]
Aicpu kernel execute failed, device_id=0, stream_id=1, task_id=1340, fault so_name=libpt_kernels.so, fault kernel_name=RunCpuKernel, extend_info=[FUNC:GetError][FILE:stream.cc][LINE:697]
你好问题已经收到,正在分析中,有进展会及时知会你,谢谢
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论