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 API adaptor No.42、43】 Migrate paddle.diff/conj into pir #58676

Merged
merged 9 commits into from
Nov 21, 2023
Merged

【PIR API adaptor No.42、43】 Migrate paddle.diff/conj into pir #58676

merged 9 commits into from
Nov 21, 2023

Conversation

DrRyanHuang
Copy link
Member

@DrRyanHuang DrRyanHuang commented Nov 3, 2023

PR types

Others

PR changes

APIs

Description

PIR API 推全升级
将 paddle.diff/conj 迁移升级至 pir,并更新单测

conj 单测全部通过

diff 单测报错:

  • TestDiffOpFp16.test_fp16_with_gputest_static 报错:
TypeError: Cannot interpret '<DataType.FLOAT32: 10>' as a data type
TypeError: Cannot interpret '<DataType.BOOL: 1>' as a data type
TypeError: Cannot interpret '<DataType.FLOAT16: 15>' as a data type

Copy link

paddle-bot bot commented Nov 3, 2023

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label Nov 3, 2023
@DrRyanHuang DrRyanHuang changed the title 【PIR API adaptor No.233、234】 Migrate paddle.diff/conj into pir 【PIR API adaptor No.42、43】 Migrate paddle.diff/conj into pir Nov 3, 2023
@0x45f
Copy link
Contributor

0x45f commented Nov 7, 2023

描述中提到的两个错误,能把完整的报错栈贴一下嘛~

@DrRyanHuang

This comment was marked as off-topic.

@MarioLulab
Copy link
Contributor

test_grad这些case是动态图的测试case,不需要在pir下测试。应该只需要打开test_static的测试case就行。可以先只打开test_static的测试case,看一下是否还会报错

@DrRyanHuang

This comment was marked as off-topic.

@DrRyanHuang

This comment was marked as off-topic.

Copy link

paddle-ci-bot bot commented Nov 14, 2023

Sorry to inform you that 02a5546's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@DrRyanHuang

This comment was marked as duplicate.

1 similar comment
@DrRyanHuang

This comment was marked as off-topic.

@MarioLulab
Copy link
Contributor

test_static

这是因为 _diff_handler 的适配没有做完全:
image
在 x 为 OpResult 时 x.dtype 为 core.DataType.BOOL,此处使用 x.dtype == paddle.bool 没法正确判断出 x 的数据类型,结果是在 x.dtype 为 core.DataType.BOOL 时走入 else 分支 (即调用 _C_ops.subtract),但是 phi::SubtractKernel 并没有注册 bool 类型的输入,所以报错了。因此,应该改为:

if x.dtype == paddle.bool or x.dtype == core.DataType.BOOL:

Copy link
Contributor

@MarioLulab MarioLulab left a comment

Choose a reason for hiding this comment

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

LGTM

YuanRisheng
YuanRisheng previously approved these changes Nov 20, 2023
0x45f
0x45f previously approved these changes Nov 20, 2023
@DrRyanHuang DrRyanHuang dismissed stale reviews from 0x45f and YuanRisheng via d399662 November 20, 2023 11:52
@0x45f 0x45f merged commit 1113646 into PaddlePaddle:develop Nov 21, 2023
28 checks passed
@DrRyanHuang DrRyanHuang deleted the diff_conj branch November 21, 2023 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants