Skip to content

Conversation

@Dmovic
Copy link
Contributor

@Dmovic Dmovic commented Mar 12, 2024

PR types

Others

PR changes

Others

Description

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

@paddle-bot
Copy link

paddle-bot bot commented Mar 12, 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 12, 2024

CLA assistant check
All committers have signed the CLA.

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

如果可以通过的话,需要在 test/white_list/pir_op_test_white_list 中增加这个单测 test_batch_fc_op

@Dmovic
Copy link
Contributor Author

Dmovic commented Mar 13, 2024

如果可以通过的话,需要在 test/white_list/pir_op_test_white_list 中增加这个单测 test_batch_fc_op

好的,还想请教一个问题,PR-CI-Coverage这个ci测试失败了,看了一下报错是添加的InferShape部分,这个是因为InferShape函数没有注册上去吗

image

image

@kangguangli
Copy link
Contributor

如果可以通过的话,需要在 test/white_list/pir_op_test_white_list 中增加这个单测 test_batch_fc_op

好的,还想请教一个问题,PR-CI-Coverage这个ci测试失败了,看了一下报错是添加的InferShape部分,这个是因为InferShape函数没有注册上去吗

这倒不是,这是因为没跑到这段代码,覆盖率没过。理论上你添加单测后应该就能测试到这段代码了。

@Dmovic
Copy link
Contributor Author

Dmovic commented Mar 17, 2024

查看Q&A,为了解决RuntimeError: (PreconditionNotMet) op [pd_op.xxx] kernel output args defs should equal op outputs这个问题,在LegacyOpList加入了BatchFC

const std::unordered_set<std::string> LegacyOpList = { LoadCombineOp::name(), BatchFCOp::name(), BatchFCGradOp::name(), 

但是在build阶段遇到了如下报错

[ 48%] Building CXX object paddle/fluid/memory/allocation/CMakeFiles/allocator.dir/cuda_virtual_mem_allocator.cc.o /paddle/paddle/fluid/pir/dialect/operator/utils/utils.cc:40:5: error: ???BatchFCOp??? has not been declared BatchFCOp::name(), /paddle/paddle/fluid/pir/dialect/operator/utils/utils.cc:41:5: error: ???BatchFCGradOp??? has not been declared BatchFCGradOp::name(), 
@kangguangli
Copy link
Contributor

BatchFCOp

名字错了,按照驼峰命名,这里会是BatchFcOp。可以查看下编译生成的paddle/fluid/pir/dialect/operator/ir/pd_op.h确认下。

@Dmovic
Copy link
Contributor Author

Dmovic commented Mar 18, 2024

BatchFCOp

名字错了,按照驼峰命名,这里会是BatchFcOp。可以查看下编译生成的paddle/fluid/pir/dialect/operator/ir/pd_op.h确认下。

谢谢,fix这个问题之后已经能够通过CI测试了

Co-authored-by: kangguangli <kangguangli@hotmail.com>
@Dmovic
Copy link
Contributor Author

Dmovic commented Mar 19, 2024

谢谢,已按照建议修改

kangguangli
kangguangli previously approved these changes Mar 20, 2024
@Dmovic
Copy link
Contributor Author

Dmovic commented Mar 20, 2024

好的,已按照建议修改

@kangguangli kangguangli requested a review from zyfncg March 21, 2024 11:14
@kangguangli kangguangli merged commit 49c09ed into PaddlePaddle:develop Mar 21, 2024
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

5 participants