torch_npu\csrc\core\npu\NPUFunctions.h
c10_npu::WarningState& c10_npu::warning_state()
获取当前同步时警告等级,返回值类型WarningState为枚举类,包含无警告L_DISABLED、警告L_WARN和报错L_ERROR,与WarningState& c10::cuda::warning_state()相同。