调用不支持的算子

问题现象

关键字"Warning: CAUTION: The operator 'xxx' is not currently supported on the NPU backend and will fall back to run on the CPU. This may have performance implications. (function npu_cpu_fallback)"

[W compiler_depend.ts:51] Warning: CAUTION: The operator 'aten::linalg_lstsq.out' is not currently supported on the NPU backend and will fall back to run on the CPU. This may have performance implications. (function npu_cpu_fallback)
Traceback (most recent call last):
  File "temp_1.py", line 4, in <module>
    torch.linalg.lstsq(torch.randn(1, 3, 3).npu(), torch.randn(2, 3, 3).npu())
RuntimeError: _copy_from_and_resize now only support copy with same size!
[ERROR] 2024-11-28-11:37:15 (PID:6547, Device:0, RankID:-1) ERR01007 OPS feature not supported

故障根因

关键过程:模型运行过程中,屏显信息打印该警告。

根本原因分析:一些算子NPU还不支持。

处理方法

Error Code

ERR01007

故障事件名称

调用不支持的算子

故障解释/可能原因

一些算子NPU还不支持

故障影响

可能影响性能

故障自处理模式

如果只是抛告警无报错,在不考虑改善性能的情况下可不处理;其他情况,请改用torch其他可替换并支持的接口

系统处理建议

无需操作