Ascend PyTorch Profiler采集过程中提示:Incorrect schedule

故障现象

使用Ascend PyTorch Profiler接口采集PyTorch性能数据过程中,打印“Incorrect schedule”提示信息,如下图所示:

profiler.py: Incorrect schedule: Stop profiler while current state is WARMUP which will result in enpty parsed data.

profiler.py: Incorrect schedule: Stop profiler while current state is RECORD which may result in incomplete parsed data.

profiler.py: Stop profiler while current state is RECORD_AND_SAVE, perhaps the scheduling sycle has not yet completed.

故障原因

故障处理

检查设置的schedule是否正确(建议通过此公式判断:step总数 >= skip_first+(wait+warmup+active)*repeat),确保Profiler完成schedule后还有足够的step用于性能数据采集。