Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【PIR OpTest Fix No.34】 fix test_rank_attention_op #62900

Merged
merged 14 commits into from
Mar 27, 2024

Conversation

CJ77Qi
Copy link
Contributor

@CJ77Qi CJ77Qi commented Mar 20, 2024

PR types

Others

PR changes

Others

Description

PIR Op单测修复
修复单测 test_rank_attention_op
修复后打开FLAGS_enable_pir_in_executor单测是否通过:是

Copy link

paddle-bot bot commented Mar 20, 2024

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@CLAassistant
Copy link

CLAassistant commented Mar 20, 2024

CLA assistant check
All committers have signed the CLA.

@paddle-bot paddle-bot bot added the contributor External developers label Mar 20, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Mar 21, 2024
Copy link
Contributor

@kangguangli kangguangli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起来在翻译的时候失败了,问题是max_rank这个属性翻译后的Type错误,它应当被翻译为Int32,但实际上翻译到的不是结果。有兴趣的话可以简单分析定位下,应该不是一个很复杂的问题。

InvalidArgumentError: Type of attribute: max_rank is not pir::Int32Attribute.
2024-03-21 06:27:41   [Hint: Expected attributes.at("max_rank").isa<pir::Int32Attribute>() == true, but received attributes.at("max_rank").isa<pir::Int32Attribute>():0 != true:1.] (at /paddle/build/paddle/fluid/pir/dialect/operator/ir/pd_pir_op.cc:36120)
  1. 可以尝试打开program translator模块的日志,GLOG_vmodule=translator=10,看看对rank_attention翻译的日志
  2. 在program translator中加入一些log,尝试调试下。

@CJ77Qi
Copy link
Contributor Author

CJ77Qi commented Mar 21, 2024

看起来在翻译的时候失败了,问题是max_rank这个属性翻译后的Type错误,它应当被翻译为Int32,但实际上翻译到的不是结果。有兴趣的话可以简单分析定位下,应该不是一个很复杂的问题。

InvalidArgumentError: Type of attribute: max_rank is not pir::Int32Attribute.
2024-03-21 06:27:41   [Hint: Expected attributes.at("max_rank").isa<pir::Int32Attribute>() == true, but received attributes.at("max_rank").isa<pir::Int32Attribute>():0 != true:1.] (at /paddle/build/paddle/fluid/pir/dialect/operator/ir/pd_pir_op.cc:36120)
  1. 可以尝试打开program translator模块的日志,GLOG_vmodule=translator=10,看看对rank_attention翻译的日志
  2. 在program translator中加入一些log,尝试调试下。

好的谢谢您,我check一下

@CJ77Qi
Copy link
Contributor Author

CJ77Qi commented Mar 22, 2024

@kangguangli 您好,请问这个 PR-CI-Coverage 没通过感觉不是修改test_rank_attention_op造成的相关报错,能麻烦看一下嘛

@kangguangli
Copy link
Contributor

@kangguangli 您好,请问这个 PR-CI-Coverage 没通过感觉不是修改test_rank_attention_op造成的相关报错,能麻烦看一下嘛

分布式单测超时了,大概率机器问题,先帮你rerun了

@CJ77Qi
Copy link
Contributor Author

CJ77Qi commented Mar 25, 2024

test_rank_attention_op的单测均通过但是仍然coverage报其他错误,是由于本PR修改造成的吗?

@kangguangli
Copy link
Contributor

test_rank_attention_op的单测均通过但是仍然coverage报其他错误,是由于本PR修改造成的吗?

现在是覆盖率不够报错,看了下可能是覆盖率检测模块的问题,报的不是你代码的问题,我申请下豁免即可。

@CJ77Qi
Copy link
Contributor Author

CJ77Qi commented Mar 25, 2024

test_rank_attention_op的单测均通过但是仍然coverage报其他错误,是由于本PR修改造成的吗?

现在是覆盖率不够报错,看了下可能是覆盖率检测模块的问题,报的不是你代码的问题,我申请下豁免即可。

好的,谢谢您

paddle/fluid/pir/dialect/operator/ir/ops.yaml Show resolved Hide resolved
int max_rank,
int max_size,
MetaTensor* rank_param_grad) {
rank_param_grad->set_dims(rank_param.dims());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里需要设置一下rank_param_grad的dtype

data_type : x
backward : rank_attention_grad
optional : ins_rank, input_help
W
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
W

@kangguangli kangguangli merged commit d1714d3 into PaddlePaddle:develop Mar 27, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants