【PIR OpTest Fix No.4】 fix test_sgd_op_bf16 #60210
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR types
Others
PR changes
Others
Description
PIR Op单测修复


修复单测
test_sgd_op_bf16
修复后打开
FLAGS_enable_pir_in_executor
单测是否通过:修复中报错信息:.......
遇到的问题:
单测
test_sgd_op_bf16.TestSGDOpBF16
和test_sgd_op_bf16.TestSGDOpBF16Case2
中新旧IR下执行sgd精度误差过大:
原因分析:
造成精度误差过大的原因是因为新旧IR下Kernel选择不一致造成的
由旧IR输出日志及下面的代码来看,旧IR下如果

PADDLE_WITH_DNNL
有效,会将数据排布格式由NCHW
转化为ONEDNN
类型,并且选择对应的Kernel